diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-04-16 20:41:57 (GMT) |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-05-14 19:09:29 (GMT) |
commit | 0b9e79431377df452348e78262dd5a3dc359eeef (patch) | |
tree | 0a69324b177e2db40e88988b83e0782dd9d98990 /net/sunrpc/xprt.c | |
parent | 19445b99b6d66af661c586c052de23110731a502 (diff) | |
download | linux-0b9e79431377df452348e78262dd5a3dc359eeef.tar.xz |
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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 18415cc..c71d835 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -712,10 +712,14 @@ void xprt_connect(struct rpc_task *task) task->tk_timeout = xprt->connect_timeout; rpc_sleep_on(&xprt->pending, task, xprt_connect_status); + + if (test_bit(XPRT_CLOSING, &xprt->state)) + return; + if (xprt_test_and_set_connecting(xprt)) + return; xprt->stat.connect_start = jiffies; xprt->ops->connect(task); } - return; } static void xprt_connect_status(struct rpc_task *task) |