SUNRPC: Make call_status()/call_decode() call xprt_force_disconnect()
Move the calls to xprt_disconnect() over to xprt_force_disconnect() in order to enable the transport layer to manage the state of the XPRT_CONNECTED flag. Ditto in xs_tcp_read_fraghdr(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
7272dcd31d
commit
3ebb067d92
2 changed files with 3 additions and 3 deletions
|
@ -1137,7 +1137,7 @@ call_status(struct rpc_task *task)
|
||||||
case -ETIMEDOUT:
|
case -ETIMEDOUT:
|
||||||
task->tk_action = call_timeout;
|
task->tk_action = call_timeout;
|
||||||
if (task->tk_client->cl_discrtry)
|
if (task->tk_client->cl_discrtry)
|
||||||
xprt_disconnect(task->tk_xprt);
|
xprt_force_disconnect(task->tk_xprt);
|
||||||
break;
|
break;
|
||||||
case -ECONNREFUSED:
|
case -ECONNREFUSED:
|
||||||
case -ENOTCONN:
|
case -ENOTCONN:
|
||||||
|
@ -1260,7 +1260,7 @@ call_decode(struct rpc_task *task)
|
||||||
req->rq_received = req->rq_private_buf.len = 0;
|
req->rq_received = req->rq_private_buf.len = 0;
|
||||||
task->tk_status = 0;
|
task->tk_status = 0;
|
||||||
if (task->tk_client->cl_discrtry)
|
if (task->tk_client->cl_discrtry)
|
||||||
xprt_disconnect(task->tk_xprt);
|
xprt_force_disconnect(task->tk_xprt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -903,7 +903,7 @@ static inline void xs_tcp_read_fraghdr(struct rpc_xprt *xprt, struct xdr_skb_rea
|
||||||
/* Sanity check of the record length */
|
/* Sanity check of the record length */
|
||||||
if (unlikely(transport->tcp_reclen < 4)) {
|
if (unlikely(transport->tcp_reclen < 4)) {
|
||||||
dprintk("RPC: invalid TCP record fragment length\n");
|
dprintk("RPC: invalid TCP record fragment length\n");
|
||||||
xprt_disconnect(xprt);
|
xprt_force_disconnect(xprt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dprintk("RPC: reading TCP record fragment of length %d\n",
|
dprintk("RPC: reading TCP record fragment of length %d\n",
|
||||||
|
|
Loading…
Reference in a new issue