mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 23:23:03 +00:00
SUNRPC: Don't try to send when the connection is shutting down
If the connection has been scheduled to shut down, we must assume that the socket is not in a state to accept further transmissions until the connection has been re-established. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
31d90deb65
commit
0c14584cdb
@ -1541,6 +1541,9 @@ xprt_request_transmit(struct rpc_rqst *req, struct rpc_task *snd_task)
|
||||
int is_retrans = RPC_WAS_SENT(task);
|
||||
int status;
|
||||
|
||||
if (test_bit(XPRT_CLOSE_WAIT, &xprt->state))
|
||||
return -ENOTCONN;
|
||||
|
||||
if (!req->rq_bytes_sent) {
|
||||
if (xprt_request_data_received(task)) {
|
||||
status = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user