aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.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/xprtsock.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/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 9847c30b5001..d138afa3bb35 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2016,9 +2016,6 @@ static void xs_connect(struct rpc_task *task)
2016 struct rpc_xprt *xprt = task->tk_xprt; 2016 struct rpc_xprt *xprt = task->tk_xprt;
2017 struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); 2017 struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
2018 2018
2019 if (xprt_test_and_set_connecting(xprt))
2020 return;
2021
2022 if (transport->sock != NULL && !RPC_IS_SOFTCONN(task)) { 2019 if (transport->sock != NULL && !RPC_IS_SOFTCONN(task)) {
2023 dprintk("RPC: xs_connect delayed xprt %p for %lu " 2020 dprintk("RPC: xs_connect delayed xprt %p for %lu "
2024 "seconds\n", 2021 "seconds\n",
@@ -2038,16 +2035,6 @@ static void xs_connect(struct rpc_task *task)
2038 } 2035 }
2039} 2036}
2040 2037
2041static void xs_tcp_connect(struct rpc_task *task)
2042{
2043 struct rpc_xprt *xprt = task->tk_xprt;
2044
2045 /* Exit if we need to wait for socket shutdown to complete */
2046 if (test_bit(XPRT_CLOSING, &xprt->state))
2047 return;
2048 xs_connect(task);
2049}
2050
2051/** 2038/**
2052 * xs_udp_print_stats - display UDP socket-specifc stats 2039 * xs_udp_print_stats - display UDP socket-specifc stats
2053 * @xprt: rpc_xprt struct containing statistics 2040 * @xprt: rpc_xprt struct containing statistics
@@ -2246,7 +2233,7 @@ static struct rpc_xprt_ops xs_tcp_ops = {
2246 .release_xprt = xs_tcp_release_xprt, 2233 .release_xprt = xs_tcp_release_xprt,
2247 .rpcbind = rpcb_getport_async, 2234 .rpcbind = rpcb_getport_async,
2248 .set_port = xs_set_port, 2235 .set_port = xs_set_port,
2249 .connect = xs_tcp_connect, 2236 .connect = xs_connect,
2250 .buf_alloc = rpc_malloc, 2237 .buf_alloc = rpc_malloc,
2251 .buf_free = rpc_free, 2238 .buf_free = rpc_free,
2252 .send_request = xs_tcp_send_request, 2239 .send_request = xs_tcp_send_request,