diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-11-06 18:40:12 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-30 02:05:26 -0500 |
commit | 3ebb067d92ebe5bcfd282acf12bade891d334d07 (patch) | |
tree | 99da8250d23887b8573dbeddae76ceb392c0663b /net/sunrpc | |
parent | 7272dcd31d56580dee7693c21e369fd167e137fe (diff) |
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>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/clnt.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 76be83ee4b0..046d8f68483 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -1137,7 +1137,7 @@ call_status(struct rpc_task *task) | |||
1137 | case -ETIMEDOUT: | 1137 | case -ETIMEDOUT: |
1138 | task->tk_action = call_timeout; | 1138 | task->tk_action = call_timeout; |
1139 | if (task->tk_client->cl_discrtry) | 1139 | if (task->tk_client->cl_discrtry) |
1140 | xprt_disconnect(task->tk_xprt); | 1140 | xprt_force_disconnect(task->tk_xprt); |
1141 | break; | 1141 | break; |
1142 | case -ECONNREFUSED: | 1142 | case -ECONNREFUSED: |
1143 | case -ENOTCONN: | 1143 | case -ENOTCONN: |
@@ -1260,7 +1260,7 @@ out_retry: | |||
1260 | req->rq_received = req->rq_private_buf.len = 0; | 1260 | req->rq_received = req->rq_private_buf.len = 0; |
1261 | task->tk_status = 0; | 1261 | task->tk_status = 0; |
1262 | if (task->tk_client->cl_discrtry) | 1262 | if (task->tk_client->cl_discrtry) |
1263 | xprt_disconnect(task->tk_xprt); | 1263 | xprt_force_disconnect(task->tk_xprt); |
1264 | } | 1264 | } |
1265 | 1265 | ||
1266 | /* | 1266 | /* |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 9b06b8b2a11..8c9af3d92c6 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -903,7 +903,7 @@ static inline void xs_tcp_read_fraghdr(struct rpc_xprt *xprt, struct xdr_skb_rea | |||
903 | /* Sanity check of the record length */ | 903 | /* Sanity check of the record length */ |
904 | if (unlikely(transport->tcp_reclen < 4)) { | 904 | if (unlikely(transport->tcp_reclen < 4)) { |
905 | dprintk("RPC: invalid TCP record fragment length\n"); | 905 | dprintk("RPC: invalid TCP record fragment length\n"); |
906 | xprt_disconnect(xprt); | 906 | xprt_force_disconnect(xprt); |
907 | return; | 907 | return; |
908 | } | 908 | } |
909 | dprintk("RPC: reading TCP record fragment of length %d\n", | 909 | dprintk("RPC: reading TCP record fragment of length %d\n", |