summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-15 16:53:04 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-20 17:35:58 -0500
commit727fcc64a0f8d346bdd60a7c92e9e720228ce037 (patch)
tree2a23affd83cf7d7987e1cc3ad21b7137747d7a88 /net/sunrpc/xprtsock.c
parente92053a52e68b841d1314ca04da7cbeb326ee1a0 (diff)
downloadlinux-727fcc64a0f8d346bdd60a7c92e9e720228ce037.tar.gz
linux-727fcc64a0f8d346bdd60a7c92e9e720228ce037.tar.bz2
linux-727fcc64a0f8d346bdd60a7c92e9e720228ce037.zip
SUNRPC: Don't suppress socket errors when a message read completes
If the message read completes, but the socket returned an error condition, we should ensure to propagate that error. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 492cec3f1451..e51716e88899 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -508,13 +508,10 @@ xs_read_stream_request(struct sock_xprt *transport, struct msghdr *msg,
&read);
transport->recv.offset += read;
transport->recv.copied += read;
- } else
- read = 0;
+ }
- if (transport->recv.offset == transport->recv.len) {
+ if (transport->recv.offset == transport->recv.len)
xs_read_stream_check_eor(transport, msg);
- return read;
- }
if (want == 0)
return 0;