diff options
author | Chuck Lever <cel@citi.umich.edu> | 2005-08-11 16:25:32 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-09-23 12:38:17 -0400 |
commit | 4a0f8c04f2ece949d54a0c4fd7490259cf23a58a (patch) | |
tree | 6c6e142cfa37b984dcba6f785a4f886374a307c6 /net/sunrpc/xprtsock.c | |
parent | b4b5cc85ed4ecbe4adbfbc4df028850de67a9f09 (diff) |
[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>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index a5a04203a6b0..bc90caab6088 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -307,7 +307,7 @@ static int xs_send_request(struct rpc_task *task) | |||
307 | if (status == -EAGAIN) { | 307 | if (status == -EAGAIN) { |
308 | if (test_bit(SOCK_ASYNC_NOSPACE, &xprt->sock->flags)) { | 308 | if (test_bit(SOCK_ASYNC_NOSPACE, &xprt->sock->flags)) { |
309 | /* Protect against races with xs_write_space */ | 309 | /* Protect against races with xs_write_space */ |
310 | spin_lock_bh(&xprt->sock_lock); | 310 | spin_lock_bh(&xprt->transport_lock); |
311 | /* Don't race with disconnect */ | 311 | /* Don't race with disconnect */ |
312 | if (!xprt_connected(xprt)) | 312 | if (!xprt_connected(xprt)) |
313 | task->tk_status = -ENOTCONN; | 313 | task->tk_status = -ENOTCONN; |
@@ -315,7 +315,7 @@ static int xs_send_request(struct rpc_task *task) | |||
315 | task->tk_timeout = req->rq_timeout; | 315 | task->tk_timeout = req->rq_timeout; |
316 | rpc_sleep_on(&xprt->pending, task, NULL, NULL); | 316 | rpc_sleep_on(&xprt->pending, task, NULL, NULL); |
317 | } | 317 | } |
318 | spin_unlock_bh(&xprt->sock_lock); | 318 | spin_unlock_bh(&xprt->transport_lock); |
319 | return status; | 319 | return status; |
320 | } | 320 | } |
321 | /* Keep holding the socket if it is blocked */ | 321 | /* Keep holding the socket if it is blocked */ |
@@ -415,7 +415,7 @@ static void xs_udp_data_ready(struct sock *sk, int len) | |||
415 | goto dropit; | 415 | goto dropit; |
416 | 416 | ||
417 | /* Look up and lock the request corresponding to the given XID */ | 417 | /* Look up and lock the request corresponding to the given XID */ |
418 | spin_lock(&xprt->sock_lock); | 418 | spin_lock(&xprt->transport_lock); |
419 | rovr = xprt_lookup_rqst(xprt, *xp); | 419 | rovr = xprt_lookup_rqst(xprt, *xp); |
420 | if (!rovr) | 420 | if (!rovr) |
421 | goto out_unlock; | 421 | goto out_unlock; |
@@ -436,7 +436,7 @@ static void xs_udp_data_ready(struct sock *sk, int len) | |||
436 | xprt_complete_rqst(xprt, rovr, copied); | 436 | xprt_complete_rqst(xprt, rovr, copied); |
437 | 437 | ||
438 | out_unlock: | 438 | out_unlock: |
439 | spin_unlock(&xprt->sock_lock); | 439 | spin_unlock(&xprt->transport_lock); |
440 | dropit: | 440 | dropit: |
441 | skb_free_datagram(sk, skb); | 441 | skb_free_datagram(sk, skb); |
442 | out: | 442 | out: |
@@ -531,13 +531,13 @@ static inline void xs_tcp_read_request(struct rpc_xprt *xprt, skb_reader_t *desc | |||
531 | ssize_t r; | 531 | ssize_t r; |
532 | 532 | ||
533 | /* Find and lock the request corresponding to this xid */ | 533 | /* Find and lock the request corresponding to this xid */ |
534 | spin_lock(&xprt->sock_lock); | 534 | spin_lock(&xprt->transport_lock); |
535 | req = xprt_lookup_rqst(xprt, xprt->tcp_xid); | 535 | req = xprt_lookup_rqst(xprt, xprt->tcp_xid); |
536 | if (!req) { | 536 | if (!req) { |
537 | xprt->tcp_flags &= ~XPRT_COPY_DATA; | 537 | xprt->tcp_flags &= ~XPRT_COPY_DATA; |
538 | dprintk("RPC: XID %08x request not found!\n", | 538 | dprintk("RPC: XID %08x request not found!\n", |
539 | ntohl(xprt->tcp_xid)); | 539 | ntohl(xprt->tcp_xid)); |
540 | spin_unlock(&xprt->sock_lock); | 540 | spin_unlock(&xprt->transport_lock); |
541 | return; | 541 | return; |
542 | } | 542 | } |
543 | 543 | ||
@@ -597,7 +597,7 @@ out: | |||
597 | req->rq_task->tk_pid); | 597 | req->rq_task->tk_pid); |
598 | xprt_complete_rqst(xprt, req, xprt->tcp_copied); | 598 | xprt_complete_rqst(xprt, req, xprt->tcp_copied); |
599 | } | 599 | } |
600 | spin_unlock(&xprt->sock_lock); | 600 | spin_unlock(&xprt->transport_lock); |
601 | xs_tcp_check_recm(xprt); | 601 | xs_tcp_check_recm(xprt); |
602 | } | 602 | } |
603 | 603 | ||
@@ -696,7 +696,7 @@ static void xs_tcp_state_change(struct sock *sk) | |||
696 | 696 | ||
697 | switch (sk->sk_state) { | 697 | switch (sk->sk_state) { |
698 | case TCP_ESTABLISHED: | 698 | case TCP_ESTABLISHED: |
699 | spin_lock_bh(&xprt->sock_lock); | 699 | spin_lock_bh(&xprt->transport_lock); |
700 | if (!xprt_test_and_set_connected(xprt)) { | 700 | if (!xprt_test_and_set_connected(xprt)) { |
701 | /* Reset TCP record info */ | 701 | /* Reset TCP record info */ |
702 | xprt->tcp_offset = 0; | 702 | xprt->tcp_offset = 0; |
@@ -705,7 +705,7 @@ static void xs_tcp_state_change(struct sock *sk) | |||
705 | xprt->tcp_flags = XPRT_COPY_RECM | XPRT_COPY_XID; | 705 | xprt->tcp_flags = XPRT_COPY_RECM | XPRT_COPY_XID; |
706 | rpc_wake_up(&xprt->pending); | 706 | rpc_wake_up(&xprt->pending); |
707 | } | 707 | } |
708 | spin_unlock_bh(&xprt->sock_lock); | 708 | spin_unlock_bh(&xprt->transport_lock); |
709 | break; | 709 | break; |
710 | case TCP_SYN_SENT: | 710 | case TCP_SYN_SENT: |
711 | case TCP_SYN_RECV: | 711 | case TCP_SYN_RECV: |
@@ -753,10 +753,10 @@ static void xs_write_space(struct sock *sk) | |||
753 | if (!test_and_clear_bit(SOCK_NOSPACE, &sock->flags)) | 753 | if (!test_and_clear_bit(SOCK_NOSPACE, &sock->flags)) |
754 | goto out; | 754 | goto out; |
755 | 755 | ||
756 | spin_lock_bh(&xprt->sock_lock); | 756 | spin_lock_bh(&xprt->transport_lock); |
757 | if (xprt->snd_task) | 757 | if (xprt->snd_task) |
758 | rpc_wake_up_task(xprt->snd_task); | 758 | rpc_wake_up_task(xprt->snd_task); |
759 | spin_unlock_bh(&xprt->sock_lock); | 759 | spin_unlock_bh(&xprt->transport_lock); |
760 | out: | 760 | out: |
761 | read_unlock(&sk->sk_callback_lock); | 761 | read_unlock(&sk->sk_callback_lock); |
762 | } | 762 | } |