]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
SUNRPC: Rename xprt_disconnect()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 6 Nov 2007 23:44:20 +0000 (18:44 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:05:27 +0000 (02:05 -0500)
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>
include/linux/sunrpc/xprt.h
net/sunrpc/xprt.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtsock.c

index afb9e6ad7fe07c3bd05adc32691dafba93949049..2554cd2b016fbeda16acad1e32dec65cc1d3da97 100644 (file)
@@ -245,7 +245,7 @@ void                        xprt_adjust_cwnd(struct rpc_task *task, int result);
 struct rpc_rqst *      xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid);
 void                   xprt_complete_rqst(struct rpc_task *task, int copied);
 void                   xprt_release_rqst_cong(struct rpc_task *task);
-void                   xprt_disconnect(struct rpc_xprt *xprt);
+void                   xprt_disconnect_done(struct rpc_xprt *xprt);
 void                   xprt_force_disconnect(struct rpc_xprt *xprt);
 
 /*
index 80742995e02e2081020a3fecb5cab01f5dde5881..592c2ee63e0f07683d5a349fdf3fe0606e2871d9 100644 (file)
@@ -574,11 +574,11 @@ static void xprt_autoclose(struct work_struct *work)
 }
 
 /**
- * xprt_disconnect - mark a transport as disconnected
+ * xprt_disconnect_done - mark a transport as disconnected
  * @xprt: transport to flag for disconnect
  *
  */
-void xprt_disconnect(struct rpc_xprt *xprt)
+void xprt_disconnect_done(struct rpc_xprt *xprt)
 {
        dprintk("RPC:       disconnected transport %p\n", xprt);
        spin_lock_bh(&xprt->transport_lock);
@@ -586,7 +586,7 @@ void xprt_disconnect(struct rpc_xprt *xprt)
        xprt_wake_pending_tasks(xprt, -ENOTCONN);
        spin_unlock_bh(&xprt->transport_lock);
 }
-EXPORT_SYMBOL_GPL(xprt_disconnect);
+EXPORT_SYMBOL_GPL(xprt_disconnect_done);
 
 /**
  * xprt_force_disconnect - force a transport to disconnect
index 6f2112dd9f786953c24eadc707fb208a946da4f0..73033d824eed44bfe2e9183b6870c75fe32f2a6a 100644 (file)
@@ -449,7 +449,7 @@ xprt_rdma_close(struct rpc_xprt *xprt)
        struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
 
        dprintk("RPC:       %s: closing\n", __func__);
-       xprt_disconnect(xprt);
+       xprt_disconnect_done(xprt);
        (void) rpcrdma_ep_disconnect(&r_xprt->rx_ep, &r_xprt->rx_ia);
 }
 
@@ -682,7 +682,7 @@ xprt_rdma_send_request(struct rpc_task *task)
        }
 
        if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req)) {
-               xprt_disconnect(xprt);
+               xprt_disconnect_done(xprt);
                return -ENOTCONN;       /* implies disconnect */
        }
 
index 8c9af3d92c674524a437b15ce6c3bb93f54ab56f..741ab8ad1f3ab5664f1027820d670d52178bdcc4 100644 (file)
@@ -777,7 +777,7 @@ clear_close_wait:
        clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
        clear_bit(XPRT_CLOSING, &xprt->state);
        smp_mb__after_clear_bit();
-       xprt_disconnect(xprt);
+       xprt_disconnect_done(xprt);
 }
 
 /**
@@ -1159,7 +1159,7 @@ static void xs_tcp_state_change(struct sock *sk)
                clear_bit(XPRT_CLOSING, &xprt->state);
                smp_mb__after_clear_bit();
                /* Mark transport as closed and wake up all pending tasks */
-               xprt_disconnect(xprt);
+               xprt_disconnect_done(xprt);
        }
  out:
        read_unlock(&sk->sk_callback_lock);