diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 18:59:03 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 18:59:03 -0800 |
commit | 1ed2d76e0213751c82e3a242b61b0883daf330df (patch) | |
tree | 96c9d5d0fbb9c548ac448dea558b80632c266dc2 /fs/ncpfs | |
parent | 8b0fdf631cf6a31f60a9ed3e1c0f37a9715de807 (diff) | |
parent | bc4802736d8b17eddde52e00838c348770f67c19 (diff) | |
download | linux-1ed2d76e0213751c82e3a242b61b0883daf330df.tar.bz2 |
Merge branch 'work.sock_recvmsg' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull kern_recvmsg reduction from Al Viro:
"kernel_recvmsg() is a set_fs()-using wrapper for sock_recvmsg(). In
all but one case that is not needed - use of ITER_KVEC for ->msg_iter
takes care of the data and does not care about set_fs(). The only
exception is svc_udp_recvfrom() where we want cmsg to be store into
kernel object; everything else can just use sock_recvmsg() and be done
with that.
A followup converting svc_udp_recvfrom() away from set_fs() (and
killing kernel_recvmsg() off) is *NOT* in here - I'd like to hear what
netdev folks think of the approach proposed in that followup)"
* 'work.sock_recvmsg' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
tipc: switch to sock_recvmsg()
smc: switch to sock_recvmsg()
ipvs: switch to sock_recvmsg()
mISDN: switch to sock_recvmsg()
drbd: switch to sock_recvmsg()
lustre lnet_sock_read(): switch to sock_recvmsg()
cfs2: switch to sock_recvmsg()
ncpfs: switch to sock_recvmsg()
dlm: switch to sock_recvmsg()
svc_recvfrom(): switch to sock_recvmsg()
Diffstat (limited to 'fs/ncpfs')
-rw-r--r-- | fs/ncpfs/sock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c index efb176b1751a..4c13174d85b7 100644 --- a/fs/ncpfs/sock.c +++ b/fs/ncpfs/sock.c @@ -39,7 +39,8 @@ static int _recv(struct socket *sock, void *buf, int size, unsigned flags) { struct msghdr msg = {NULL, }; struct kvec iov = {buf, size}; - return kernel_recvmsg(sock, &msg, &iov, 1, size, flags); + iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &iov, 1, size); + return sock_recvmsg(sock, &msg, flags); } static int _send(struct socket *sock, const void *buff, int len) |