aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorChuck Lever <cel@citi.umich.edu>2005-08-11 16:25:38 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-09-23 12:38:21 -0400
commit2226feb6bcd0e5e117a9be3ea3dd3ffc14f3e41e (patch)
tree5ae6bde4dd66da8932c23c780745c72cf38de722 /net/sunrpc/xprt.c
parent5dc07727f86b25851e95193a0c484ea21b531c47 (diff)
[PATCH] RPC: rename the sockstate field
Clean-up: get rid of a name reference to sockets in the generic parts of the RPC client by renaming the sockstate field in the rpc_xprt structure. Test-plan: Compile kernel with CONFIG_NFS enabled. Version: Thu, 11 Aug 2005 16:05:53 -0400 Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 9c45c522e3ef..57c5e77b155e 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -74,7 +74,7 @@ __xprt_lock_write(struct rpc_xprt *xprt, struct rpc_task *task)
74{ 74{
75 struct rpc_rqst *req = task->tk_rqstp; 75 struct rpc_rqst *req = task->tk_rqstp;
76 76
77 if (test_and_set_bit(XPRT_LOCKED, &xprt->sockstate)) { 77 if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
78 if (task == xprt->snd_task) 78 if (task == xprt->snd_task)
79 return 1; 79 return 1;
80 goto out_sleep; 80 goto out_sleep;
@@ -88,7 +88,7 @@ __xprt_lock_write(struct rpc_xprt *xprt, struct rpc_task *task)
88 return 1; 88 return 1;
89 } 89 }
90 smp_mb__before_clear_bit(); 90 smp_mb__before_clear_bit();
91 clear_bit(XPRT_LOCKED, &xprt->sockstate); 91 clear_bit(XPRT_LOCKED, &xprt->state);
92 smp_mb__after_clear_bit(); 92 smp_mb__after_clear_bit();
93out_sleep: 93out_sleep:
94 dprintk("RPC: %4d failed to lock socket %p\n", task->tk_pid, xprt); 94 dprintk("RPC: %4d failed to lock socket %p\n", task->tk_pid, xprt);
@@ -118,7 +118,7 @@ __xprt_lock_write_next(struct rpc_xprt *xprt)
118{ 118{
119 struct rpc_task *task; 119 struct rpc_task *task;
120 120
121 if (test_and_set_bit(XPRT_LOCKED, &xprt->sockstate)) 121 if (test_and_set_bit(XPRT_LOCKED, &xprt->state))
122 return; 122 return;
123 if (!xprt->nocong && RPCXPRT_CONGESTED(xprt)) 123 if (!xprt->nocong && RPCXPRT_CONGESTED(xprt))
124 goto out_unlock; 124 goto out_unlock;
@@ -139,7 +139,7 @@ __xprt_lock_write_next(struct rpc_xprt *xprt)
139 } 139 }
140out_unlock: 140out_unlock:
141 smp_mb__before_clear_bit(); 141 smp_mb__before_clear_bit();
142 clear_bit(XPRT_LOCKED, &xprt->sockstate); 142 clear_bit(XPRT_LOCKED, &xprt->state);
143 smp_mb__after_clear_bit(); 143 smp_mb__after_clear_bit();
144} 144}
145 145
@@ -152,7 +152,7 @@ __xprt_release_write(struct rpc_xprt *xprt, struct rpc_task *task)
152 if (xprt->snd_task == task) { 152 if (xprt->snd_task == task) {
153 xprt->snd_task = NULL; 153 xprt->snd_task = NULL;
154 smp_mb__before_clear_bit(); 154 smp_mb__before_clear_bit();
155 clear_bit(XPRT_LOCKED, &xprt->sockstate); 155 clear_bit(XPRT_LOCKED, &xprt->state);
156 smp_mb__after_clear_bit(); 156 smp_mb__after_clear_bit();
157 __xprt_lock_write_next(xprt); 157 __xprt_lock_write_next(xprt);
158 } 158 }
@@ -312,11 +312,11 @@ xprt_init_autodisconnect(unsigned long data)
312 spin_lock(&xprt->transport_lock); 312 spin_lock(&xprt->transport_lock);
313 if (!list_empty(&xprt->recv) || xprt->shutdown) 313 if (!list_empty(&xprt->recv) || xprt->shutdown)
314 goto out_abort; 314 goto out_abort;
315 if (test_and_set_bit(XPRT_LOCKED, &xprt->sockstate)) 315 if (test_and_set_bit(XPRT_LOCKED, &xprt->state))
316 goto out_abort; 316 goto out_abort;
317 spin_unlock(&xprt->transport_lock); 317 spin_unlock(&xprt->transport_lock);
318 /* Let keventd close the socket */ 318 /* Let keventd close the socket */
319 if (test_bit(XPRT_CONNECTING, &xprt->sockstate) != 0) 319 if (xprt_connecting(xprt))
320 xprt_release_write(xprt, NULL); 320 xprt_release_write(xprt, NULL);
321 else 321 else
322 schedule_work(&xprt->task_cleanup); 322 schedule_work(&xprt->task_cleanup);