SUNRPC: Make call_status()/call_decode() call xprt_force_disconnect()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 6 Nov 2007 23:40:12 +0000 (18:40 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:05:26 +0000 (02:05 -0500)
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>
net/sunrpc/clnt.c
net/sunrpc/xprtsock.c

index 76be83ee4b04a59f90f99a3afc69ce8889a7ff39..046d8f68483b316d1de74e001d4839f18b1e012d 100644 (file)
@@ -1137,7 +1137,7 @@ call_status(struct rpc_task *task)
        case -ETIMEDOUT:
                task->tk_action = call_timeout;
                if (task->tk_client->cl_discrtry)
-                       xprt_disconnect(task->tk_xprt);
+                       xprt_force_disconnect(task->tk_xprt);
                break;
        case -ECONNREFUSED:
        case -ENOTCONN:
@@ -1260,7 +1260,7 @@ out_retry:
        req->rq_received = req->rq_private_buf.len = 0;
        task->tk_status = 0;
        if (task->tk_client->cl_discrtry)
-               xprt_disconnect(task->tk_xprt);
+               xprt_force_disconnect(task->tk_xprt);
 }
 
 /*
index 9b06b8b2a11223cfac87dad4addce46ac9a93b6c..8c9af3d92c674524a437b15ce6c3bb93f54ab56f 100644 (file)
@@ -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 */
        if (unlikely(transport->tcp_reclen < 4)) {
                dprintk("RPC:       invalid TCP record fragment length\n");
-               xprt_disconnect(xprt);
+               xprt_force_disconnect(xprt);
                return;
        }
        dprintk("RPC:       reading TCP record fragment of length %d\n",