mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
SUNRPC: Ensure that we honour autoclose before attempting to reconnect
If the XPRT_CLOSE_WAIT flag is set, we need to ensure that we call xprt->ops->close() while holding xprt_lock_write() before we can start reconnecting. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
22763c5cf3
commit
feb8ca37cc
1 changed files with 4 additions and 0 deletions
|
@ -700,6 +700,10 @@ void xprt_connect(struct rpc_task *task)
|
|||
}
|
||||
if (!xprt_lock_write(xprt, task))
|
||||
return;
|
||||
|
||||
if (test_and_clear_bit(XPRT_CLOSE_WAIT, &xprt->state))
|
||||
xprt->ops->close(xprt);
|
||||
|
||||
if (xprt_connected(xprt))
|
||||
xprt_release_write(xprt, task);
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue