mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
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>
This commit is contained in:
parent
e92053a52e
commit
727fcc64a0
1 changed files with 2 additions and 5 deletions
|
|
@ -508,14 +508,11 @@ 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) {
|
||||
xs_read_stream_check_eor(transport, msg);
|
||||
return read;
|
||||
}
|
||||
|
||||
if (transport->recv.offset == transport->recv.len)
|
||||
xs_read_stream_check_eor(transport, msg);
|
||||
|
||||
if (want == 0)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue