From 727fcc64a0f8d346bdd60a7c92e9e720228ce037 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Fri, 15 Feb 2019 16:53:04 -0500 Subject: 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 --- net/sunrpc/xprtsock.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'net/sunrpc') 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; -- cgit v1.2.3-59-g8ed1b