|
@@ -669,7 +669,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie)
|
|
|
spin_lock_bh(&xprt->transport_lock);
|
|
|
if (cookie != xprt->connect_cookie)
|
|
|
goto out;
|
|
|
- if (test_bit(XPRT_CLOSING, &xprt->state) || !xprt_connected(xprt))
|
|
|
+ if (test_bit(XPRT_CLOSING, &xprt->state))
|
|
|
goto out;
|
|
|
set_bit(XPRT_CLOSE_WAIT, &xprt->state);
|
|
|
/* Try to schedule an autoclose RPC call */
|
|
@@ -772,6 +772,7 @@ void xprt_connect(struct rpc_task *task)
|
|
|
if (!xprt_connected(xprt)) {
|
|
|
task->tk_rqstp->rq_bytes_sent = 0;
|
|
|
task->tk_timeout = task->tk_rqstp->rq_timeout;
|
|
|
+ task->tk_rqstp->rq_connect_cookie = xprt->connect_cookie;
|
|
|
rpc_sleep_on(&xprt->pending, task, xprt_connect_status);
|
|
|
|
|
|
if (test_bit(XPRT_CLOSING, &xprt->state))
|