Re: [PATCH v2 05/16] splice: remove permission hook from iter_file_splice_write()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > diff --git a/fs/splice.c b/fs/splice.c
> > index d983d375ff1130..982a0872fa03e9 100644
> > --- a/fs/splice.c
> > +++ b/fs/splice.c
> > @@ -684,6 +684,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
> >
> >         splice_from_pipe_begin(&sd);
> >         while (sd.total_len) {
> > +               struct kiocb kiocb;
> >                 struct iov_iter from;
> >                 unsigned int head, tail, mask;
> >                 size_t left;
> > @@ -733,7 +734,10 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
> >                 }
> >
> >                 iov_iter_bvec(&from, ITER_SOURCE, array, n, sd.total_len - left);
> > -               ret = vfs_iter_write(out, &from, &sd.pos, 0);
> > +               init_sync_kiocb(&kiocb, out);
> > +               kiocb.ki_pos = sd.pos;
> > +               ret = out->f_op->write_iter(&kiocb, &from);
> > +               sd.pos = kiocb.ki_pos;
> >                 if (ret <= 0)
> >                         break;
> >
> 
> Are we open coding call_write_iter() now?
> Is that a trend that I am not aware of?

I'll fold that in as-is but I'll use call_write_iter() for now.
We can remove that later. For now consistency matters more.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux