diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 21:59:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 21:59:03 -0500 |
commit | 1ed2d76e0213751c82e3a242b61b0883daf330df (patch) | |
tree | 96c9d5d0fbb9c548ac448dea558b80632c266dc2 /net/sunrpc/svcsock.c | |
parent | 8b0fdf631cf6a31f60a9ed3e1c0f37a9715de807 (diff) | |
parent | bc4802736d8b17eddde52e00838c348770f67c19 (diff) |
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 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index ff8e06cd067e..5570719e4787 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -338,8 +338,8 @@ static int svc_recvfrom(struct svc_rqst *rqstp, struct kvec *iov, int nr, | |||
338 | rqstp->rq_xprt_hlen = 0; | 338 | rqstp->rq_xprt_hlen = 0; |
339 | 339 | ||
340 | clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); | 340 | clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); |
341 | len = kernel_recvmsg(svsk->sk_sock, &msg, iov, nr, buflen, | 341 | iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, iov, nr, buflen); |
342 | msg.msg_flags); | 342 | len = sock_recvmsg(svsk->sk_sock, &msg, msg.msg_flags); |
343 | /* If we read a full record, then assume there may be more | 343 | /* If we read a full record, then assume there may be more |
344 | * data to read (stream based sockets only!) | 344 | * data to read (stream based sockets only!) |
345 | */ | 345 | */ |