diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-11-06 18:44:20 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-01-30 02:05:27 -0500 |
commit | 62da3b24880bccd4ffc32cf8d9a7e23fab475bdd (patch) | |
tree | 334804c6eb817bd7827f58dbe86ced455160052d | |
parent | 3ebb067d92ebe5bcfd282acf12bade891d334d07 (diff) |
SUNRPC: Rename xprt_disconnect()
xprt_disconnect() should really only be called when the transport shutdown
is completed, and it is time to wake up any pending tasks. Rename it to
xprt_disconnect_done() in order to reflect the semantical change.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | include/linux/sunrpc/xprt.h | 2 | ||||
-rw-r--r-- | net/sunrpc/xprt.c | 6 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 4 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index afb9e6ad7fe0..2554cd2b016f 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -245,7 +245,7 @@ void xprt_adjust_cwnd(struct rpc_task *task, int result); | |||
245 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid); | 245 | struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid); |
246 | void xprt_complete_rqst(struct rpc_task *task, int copied); | 246 | void xprt_complete_rqst(struct rpc_task *task, int copied); |
247 | void xprt_release_rqst_cong(struct rpc_task *task); | 247 | void xprt_release_rqst_cong(struct rpc_task *task); |
248 | void xprt_disconnect(struct rpc_xprt *xprt); | 248 | void xprt_disconnect_done(struct rpc_xprt *xprt); |
249 | void xprt_force_disconnect(struct rpc_xprt *xprt); | 249 | void xprt_force_disconnect(struct rpc_xprt *xprt); |
250 | 250 | ||
251 | /* | 251 | /* |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 80742995e02e..592c2ee63e0f 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -574,11 +574,11 @@ static void xprt_autoclose(struct work_struct *work) | |||
574 | } | 574 | } |
575 | 575 | ||
576 | /** | 576 | /** |
577 | * xprt_disconnect - mark a transport as disconnected | 577 | * xprt_disconnect_done - mark a transport as disconnected |
578 | * @xprt: transport to flag for disconnect | 578 | * @xprt: transport to flag for disconnect |
579 | * | 579 | * |
580 | */ | 580 | */ |
581 | void xprt_disconnect(struct rpc_xprt *xprt) | 581 | void xprt_disconnect_done(struct rpc_xprt *xprt) |
582 | { | 582 | { |
583 | dprintk("RPC: disconnected transport %p\n", xprt); | 583 | dprintk("RPC: disconnected transport %p\n", xprt); |
584 | spin_lock_bh(&xprt->transport_lock); | 584 | spin_lock_bh(&xprt->transport_lock); |
@@ -586,7 +586,7 @@ void xprt_disconnect(struct rpc_xprt *xprt) | |||
586 | xprt_wake_pending_tasks(xprt, -ENOTCONN); | 586 | xprt_wake_pending_tasks(xprt, -ENOTCONN); |
587 | spin_unlock_bh(&xprt->transport_lock); | 587 | spin_unlock_bh(&xprt->transport_lock); |
588 | } | 588 | } |
589 | EXPORT_SYMBOL_GPL(xprt_disconnect); | 589 | EXPORT_SYMBOL_GPL(xprt_disconnect_done); |
590 | 590 | ||
591 | /** | 591 | /** |
592 | * xprt_force_disconnect - force a transport to disconnect | 592 | * xprt_force_disconnect - force a transport to disconnect |
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 6f2112dd9f78..73033d824eed 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -449,7 +449,7 @@ xprt_rdma_close(struct rpc_xprt *xprt) | |||
449 | struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); | 449 | struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); |
450 | 450 | ||
451 | dprintk("RPC: %s: closing\n", __func__); | 451 | dprintk("RPC: %s: closing\n", __func__); |
452 | xprt_disconnect(xprt); | 452 | xprt_disconnect_done(xprt); |
453 | (void) rpcrdma_ep_disconnect(&r_xprt->rx_ep, &r_xprt->rx_ia); | 453 | (void) rpcrdma_ep_disconnect(&r_xprt->rx_ep, &r_xprt->rx_ia); |
454 | } | 454 | } |
455 | 455 | ||
@@ -682,7 +682,7 @@ xprt_rdma_send_request(struct rpc_task *task) | |||
682 | } | 682 | } |
683 | 683 | ||
684 | if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req)) { | 684 | if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req)) { |
685 | xprt_disconnect(xprt); | 685 | xprt_disconnect_done(xprt); |
686 | return -ENOTCONN; /* implies disconnect */ | 686 | return -ENOTCONN; /* implies disconnect */ |
687 | } | 687 | } |
688 | 688 | ||
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 8c9af3d92c67..741ab8ad1f3a 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -777,7 +777,7 @@ clear_close_wait: | |||
777 | clear_bit(XPRT_CLOSE_WAIT, &xprt->state); | 777 | clear_bit(XPRT_CLOSE_WAIT, &xprt->state); |
778 | clear_bit(XPRT_CLOSING, &xprt->state); | 778 | clear_bit(XPRT_CLOSING, &xprt->state); |
779 | smp_mb__after_clear_bit(); | 779 | smp_mb__after_clear_bit(); |
780 | xprt_disconnect(xprt); | 780 | xprt_disconnect_done(xprt); |
781 | } | 781 | } |
782 | 782 | ||
783 | /** | 783 | /** |
@@ -1159,7 +1159,7 @@ static void xs_tcp_state_change(struct sock *sk) | |||
1159 | clear_bit(XPRT_CLOSING, &xprt->state); | 1159 | clear_bit(XPRT_CLOSING, &xprt->state); |
1160 | smp_mb__after_clear_bit(); | 1160 | smp_mb__after_clear_bit(); |
1161 | /* Mark transport as closed and wake up all pending tasks */ | 1161 | /* Mark transport as closed and wake up all pending tasks */ |
1162 | xprt_disconnect(xprt); | 1162 | xprt_disconnect_done(xprt); |
1163 | } | 1163 | } |
1164 | out: | 1164 | out: |
1165 | read_unlock(&sk->sk_callback_lock); | 1165 | read_unlock(&sk->sk_callback_lock); |