aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-04-16 16:41:57 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-05-14 15:09:29 -0400
commit0b9e79431377df452348e78262dd5a3dc359eeef (patch)
tree0a69324b177e2db40e88988b83e0782dd9d98990 /net/sunrpc/xprt.c
parent19445b99b6d66af661c586c052de23110731a502 (diff)
SUNRPC: Move the test for XPRT_CONNECTING into xprt_connect()
This fixes a bug with setting xprt->stat.connect_start. Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 18415cc37c01..c71d835165e2 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -712,10 +712,14 @@ void xprt_connect(struct rpc_task *task)
712 712
713 task->tk_timeout = xprt->connect_timeout; 713 task->tk_timeout = xprt->connect_timeout;
714 rpc_sleep_on(&xprt->pending, task, xprt_connect_status); 714 rpc_sleep_on(&xprt->pending, task, xprt_connect_status);
715
716 if (test_bit(XPRT_CLOSING, &xprt->state))
717 return;
718 if (xprt_test_and_set_connecting(xprt))
719 return;
715 xprt->stat.connect_start = jiffies; 720 xprt->stat.connect_start = jiffies;
716 xprt->ops->connect(task); 721 xprt->ops->connect(task);
717 } 722 }
718 return;
719} 723}
720 724
721static void xprt_connect_status(struct rpc_task *task) 725static void xprt_connect_status(struct rpc_task *task)