Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-10-31 16:21:34 +1100
committerNeilBrown <neilb@suse.de>2013-10-31 16:21:34 +1100
commit4d0d5d94f64ab3c79d42504b427e4a76e9842572 (patch)
tree78af6cde8da628ad2356df43220abba8155f1f44
parent2cf890cb37b2224ed84bb825da1998a021c452d2 (diff)
- patches.fixes/nfs-xs_tcp_setup_socket.fix: SUNRPC: close arpm-3.0.101-0.5
rare race in xs_tcp_setup_socket (bnc#794824). suse-commit: 36fae465249c8f16b115b90b81cbed1c31dcb4a4
-rw-r--r--net/sunrpc/xprtsock.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 48a76e84f71e..bc6d4963edac 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -818,6 +818,8 @@ static void xs_close(struct rpc_xprt *xprt)
dprintk("RPC: xs_close xprt %p\n", xprt);
+ cancel_delayed_work_sync(&transport->connect_worker);
+
xs_reset_transport(transport);
xprt->reestablish_timeout = 0;
@@ -844,12 +846,8 @@ static void xs_tcp_close(struct rpc_xprt *xprt)
*/
static void xs_destroy(struct rpc_xprt *xprt)
{
- struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
-
dprintk("RPC: xs_destroy xprt %p\n", xprt);
- cancel_delayed_work_sync(&transport->connect_worker);
-
xs_close(xprt);
xs_free_peer_addresses(xprt);
xprt_free(xprt);