mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
SUNRPC: Initiate a connection close on an ESHUTDOWN error in stream receive
If the client stream receive code receives an ESHUTDOWN error either because the server closed the connection, or because it sent a callback which cannot be processed, then we should shut down the connection. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
727fcc64a0
commit
5f52a9d429
@ -705,6 +705,9 @@ static void xs_stream_data_receive(struct sock_xprt *transport)
|
||||
read += ret;
|
||||
cond_resched();
|
||||
}
|
||||
if (ret == -ESHUTDOWN)
|
||||
kernel_sock_shutdown(transport->sock, SHUT_RDWR);
|
||||
else
|
||||
xs_poll_check_readable(transport);
|
||||
out:
|
||||
mutex_unlock(&transport->recv_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user