lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/14] fs: don't change the address limit for ->write_iter in __kernel_write
On Sat, May 16, 2020 at 11:04:36AM +0800, Hillf Danton wrote:
> > + if (file->f_op->write_iter) {
> > + struct kvec iov = { .iov_base = (void *)buf, .iov_len = count };
> > + struct kiocb kiocb;
> > + struct iov_iter iter;
> > +
> > + init_sync_kiocb(&kiocb, file);
> > + kiocb.ki_pos = *pos;
> > + iov_iter_kvec(&iter, WRITE, &iov, 1, count);
> > + ret = file->f_op->write_iter(&kiocb, &iter);
> > + if (ret > 0)
> > + *pos = kiocb.ki_pos;
> > + } else if (file->f_op->write) {
> > + mm_segment_t old_fs = get_fs();
> > +
> > + set_fs(KERNEL_DS);
>
> Would you please shed light on who need it if a workqueue worker does
> not, given the access to buf?

Can you rephrase the question, I unfortunately do not understand it at
all as-is.

\
 
 \ /
  Last update: 2020-05-18 08:43    [W:0.120 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site