Merge branch 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS splice updates from Al Viro: "There's a bunch of branches this cycle, both mine and from other folks and I'd rather send pull requests separately. This one is the conversion of ->splice_read() to ITER_PIPE iov_iter (and introduction of such). Gets rid of a lot of code in fs/splice.c and elsewhere; there will be followups, but these are for the next cycle... Some pipe/splice-related cleanups from Miklos in the same branch as well" * 'work.splice_read' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: pipe: fix comment in pipe_buf_operations pipe: add pipe_buf_steal() helper pipe: add pipe_buf_confirm() helper pipe: add pipe_buf_release() helper pipe: add pipe_buf_get() helper relay: simplify relay_file_read() switch default_file_splice_read() to use of pipe-backed iov_iter switch generic_file_splice_read() to use of ->read_iter() new iov_iter flavour: pipe-backed fuse_dev_splice_read(): switch to add_to_pipe() skb_splice_bits(): get rid of callback new helper: add_to_pipe() splice: lift pipe_lock out of splice_to_pipe() splice: switch get_iovec_page_array() to iov_iter splice_to_pipe(): don't open-code wakeup_pipe_readers() consistent treatment of EFAULT on O_DIRECT read/write
This commit is contained in:
@@ -1160,19 +1160,6 @@ out:
|
||||
return copied ? : err;
|
||||
}
|
||||
|
||||
static ssize_t kcm_sock_splice(struct sock *sk,
|
||||
struct pipe_inode_info *pipe,
|
||||
struct splice_pipe_desc *spd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
release_sock(sk);
|
||||
ret = splice_to_pipe(pipe, spd);
|
||||
lock_sock(sk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos,
|
||||
struct pipe_inode_info *pipe, size_t len,
|
||||
unsigned int flags)
|
||||
@@ -1202,8 +1189,7 @@ static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos,
|
||||
if (len > rxm->full_len)
|
||||
len = rxm->full_len;
|
||||
|
||||
copied = skb_splice_bits(skb, sk, rxm->offset, pipe, len, flags,
|
||||
kcm_sock_splice);
|
||||
copied = skb_splice_bits(skb, sk, rxm->offset, pipe, len, flags);
|
||||
if (copied < 0) {
|
||||
err = copied;
|
||||
goto err_out;
|
||||
|
Reference in New Issue
Block a user