aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-11-06 18:28:53 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:26 -0500
commit7272dcd31d56580dee7693c21e369fd167e137fe (patch)
treea69f10501069ec89d8fb7188f89e7d1d19929488 /net/sunrpc/xprtsock.c
parente06799f958bf7f9f8fae15f0c6f519953fb0257c (diff)
SUNRPC: xprt_autoclose() should not call xprt_disconnect()
The transport layer should do that itself whenever appropriate. Note that the RDMA transport already assumes that it needs to call xprt_disconnect in xprt_rdma_close(). For TCP sockets, we want to call xprt_disconnect() only after the connection has been closed by both ends. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index a4c06900f398..9b06b8b2a112 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -774,10 +774,10 @@ static void xs_close(struct rpc_xprt *xprt)
774 sock_release(sock); 774 sock_release(sock);
775clear_close_wait: 775clear_close_wait:
776 smp_mb__before_clear_bit(); 776 smp_mb__before_clear_bit();
777 clear_bit(XPRT_CONNECTED, &xprt->state);
778 clear_bit(XPRT_CLOSE_WAIT, &xprt->state); 777 clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
779 clear_bit(XPRT_CLOSING, &xprt->state); 778 clear_bit(XPRT_CLOSING, &xprt->state);
780 smp_mb__after_clear_bit(); 779 smp_mb__after_clear_bit();
780 xprt_disconnect(xprt);
781} 781}
782 782
783/** 783/**
@@ -793,7 +793,6 @@ static void xs_destroy(struct rpc_xprt *xprt)
793 793
794 cancel_rearming_delayed_work(&transport->connect_worker); 794 cancel_rearming_delayed_work(&transport->connect_worker);
795 795
796 xprt_disconnect(xprt);
797 xs_close(xprt); 796 xs_close(xprt);
798 xs_free_peer_addresses(xprt); 797 xs_free_peer_addresses(xprt);
799 kfree(xprt->slot); 798 kfree(xprt->slot);