aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/xprt.c1
-rw-r--r--net/sunrpc/xprtsock.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index a3af02168af1..80742995e02e 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -568,7 +568,6 @@ static void xprt_autoclose(struct work_struct *work)
568 struct rpc_xprt *xprt = 568 struct rpc_xprt *xprt =
569 container_of(work, struct rpc_xprt, task_cleanup); 569 container_of(work, struct rpc_xprt, task_cleanup);
570 570
571 xprt_disconnect(xprt);
572 xprt->ops->close(xprt); 571 xprt->ops->close(xprt);
573 clear_bit(XPRT_CLOSE_WAIT, &xprt->state); 572 clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
574 xprt_release_write(xprt, NULL); 573 xprt_release_write(xprt, NULL);
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);