[PATCH] RPC: Rename sock_lock

 Clean-up: replace a name reference to sockets in the generic parts of the RPC
 client by renaming sock_lock in the rpc_xprt structure.

 Test-plan:
 Compile kernel with CONFIG_NFS enabled.

 Version: Thu, 11 Aug 2005 16:05:00 -0400

 Signed-off-by: Chuck Lever <cel@netapp.com>
 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index a5a0420..bc90caa 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -307,7 +307,7 @@
 	if (status == -EAGAIN) {
 		if (test_bit(SOCK_ASYNC_NOSPACE, &xprt->sock->flags)) {
 			/* Protect against races with xs_write_space */
-			spin_lock_bh(&xprt->sock_lock);
+			spin_lock_bh(&xprt->transport_lock);
 			/* Don't race with disconnect */
 			if (!xprt_connected(xprt))
 				task->tk_status = -ENOTCONN;
@@ -315,7 +315,7 @@
 				task->tk_timeout = req->rq_timeout;
 				rpc_sleep_on(&xprt->pending, task, NULL, NULL);
 			}
-			spin_unlock_bh(&xprt->sock_lock);
+			spin_unlock_bh(&xprt->transport_lock);
 			return status;
 		}
 		/* Keep holding the socket if it is blocked */
@@ -415,7 +415,7 @@
 		goto dropit;
 
 	/* Look up and lock the request corresponding to the given XID */
-	spin_lock(&xprt->sock_lock);
+	spin_lock(&xprt->transport_lock);
 	rovr = xprt_lookup_rqst(xprt, *xp);
 	if (!rovr)
 		goto out_unlock;
@@ -436,7 +436,7 @@
 	xprt_complete_rqst(xprt, rovr, copied);
 
  out_unlock:
-	spin_unlock(&xprt->sock_lock);
+	spin_unlock(&xprt->transport_lock);
  dropit:
 	skb_free_datagram(sk, skb);
  out:
@@ -531,13 +531,13 @@
 	ssize_t r;
 
 	/* Find and lock the request corresponding to this xid */
-	spin_lock(&xprt->sock_lock);
+	spin_lock(&xprt->transport_lock);
 	req = xprt_lookup_rqst(xprt, xprt->tcp_xid);
 	if (!req) {
 		xprt->tcp_flags &= ~XPRT_COPY_DATA;
 		dprintk("RPC:      XID %08x request not found!\n",
 				ntohl(xprt->tcp_xid));
-		spin_unlock(&xprt->sock_lock);
+		spin_unlock(&xprt->transport_lock);
 		return;
 	}
 
@@ -597,7 +597,7 @@
 				req->rq_task->tk_pid);
 		xprt_complete_rqst(xprt, req, xprt->tcp_copied);
 	}
-	spin_unlock(&xprt->sock_lock);
+	spin_unlock(&xprt->transport_lock);
 	xs_tcp_check_recm(xprt);
 }
 
@@ -696,7 +696,7 @@
 
 	switch (sk->sk_state) {
 	case TCP_ESTABLISHED:
-		spin_lock_bh(&xprt->sock_lock);
+		spin_lock_bh(&xprt->transport_lock);
 		if (!xprt_test_and_set_connected(xprt)) {
 			/* Reset TCP record info */
 			xprt->tcp_offset = 0;
@@ -705,7 +705,7 @@
 			xprt->tcp_flags = XPRT_COPY_RECM | XPRT_COPY_XID;
 			rpc_wake_up(&xprt->pending);
 		}
-		spin_unlock_bh(&xprt->sock_lock);
+		spin_unlock_bh(&xprt->transport_lock);
 		break;
 	case TCP_SYN_SENT:
 	case TCP_SYN_RECV:
@@ -753,10 +753,10 @@
 	if (!test_and_clear_bit(SOCK_NOSPACE, &sock->flags))
 		goto out;
 
-	spin_lock_bh(&xprt->sock_lock);
+	spin_lock_bh(&xprt->transport_lock);
 	if (xprt->snd_task)
 		rpc_wake_up_task(xprt->snd_task);
-	spin_unlock_bh(&xprt->sock_lock);
+	spin_unlock_bh(&xprt->transport_lock);
 out:
 	read_unlock(&sk->sk_callback_lock);
 }