aboutsummaryrefslogtreecommitdiffstats
path: root/net/kcm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-07 18:36:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-07 18:36:58 -0400
commitd1f5323370fceaed43a7ee38f4c7bfc7e70f28d0 (patch)
treecadb1dc22207a4e1838b7af31ac3fc15363e809b /net/kcm
parent2eee010d092903ee95716b6c2fbd9d3289839aa4 (diff)
parenta949e63992469fed87aef197347960ced31701b8 (diff)
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
Diffstat (limited to 'net/kcm')
-rw-r--r--net/kcm/kcmsock.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index b7f869a85ab7..7e08a4d3d77d 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -1160,19 +1160,6 @@ out:
1160 return copied ? : err; 1160 return copied ? : err;
1161} 1161}
1162 1162
1163static ssize_t kcm_sock_splice(struct sock *sk,
1164 struct pipe_inode_info *pipe,
1165 struct splice_pipe_desc *spd)
1166{
1167 int ret;
1168
1169 release_sock(sk);
1170 ret = splice_to_pipe(pipe, spd);
1171 lock_sock(sk);
1172
1173 return ret;
1174}
1175
1176static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos, 1163static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos,
1177 struct pipe_inode_info *pipe, size_t len, 1164 struct pipe_inode_info *pipe, size_t len,
1178 unsigned int flags) 1165 unsigned int flags)
@@ -1202,8 +1189,7 @@ static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos,
1202 if (len > rxm->full_len) 1189 if (len > rxm->full_len)
1203 len = rxm->full_len; 1190 len = rxm->full_len;
1204 1191
1205 copied = skb_splice_bits(skb, sk, rxm->offset, pipe, len, flags, 1192 copied = skb_splice_bits(skb, sk, rxm->offset, pipe, len, flags);
1206 kcm_sock_splice);
1207 if (copied < 0) { 1193 if (copied < 0) {
1208 err = copied; 1194 err = copied;
1209 goto err_out; 1195 goto err_out;