diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-02-22 16:34:12 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-02-26 00:40:42 -0500 |
commit | fda1393938035559b417dd5b26b9cc293a7aee00 (patch) | |
tree | 8190a6ad7a81974dd5f782f2ab872753742ff68d /net/sunrpc | |
parent | 96ef13b283934fbf60b732e6c4ce23e8babd0042 (diff) |
SUNRPC: Convert users of rpc_wake_up_task to use rpc_wake_up_queued_task
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/clnt.c | 2 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 3 | ||||
-rw-r--r-- | net/sunrpc/xprt.c | 10 |
3 files changed, 7 insertions, 8 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index fe95bd0ab1e9..0e209af39797 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -1066,7 +1066,7 @@ call_transmit(struct rpc_task *task) | |||
1066 | if (task->tk_msg.rpc_proc->p_decode != NULL) | 1066 | if (task->tk_msg.rpc_proc->p_decode != NULL) |
1067 | return; | 1067 | return; |
1068 | task->tk_action = rpc_exit_task; | 1068 | task->tk_action = rpc_exit_task; |
1069 | rpc_wake_up_task(task); | 1069 | rpc_wake_up_queued_task(&task->tk_xprt->pending, task); |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | /* | 1072 | /* |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 9233ace076aa..35acdc39bfcb 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -417,11 +417,10 @@ EXPORT_SYMBOL_GPL(rpc_wake_up_queued_task); | |||
417 | /* | 417 | /* |
418 | * Wake up the specified task | 418 | * Wake up the specified task |
419 | */ | 419 | */ |
420 | void rpc_wake_up_task(struct rpc_task *task) | 420 | static void rpc_wake_up_task(struct rpc_task *task) |
421 | { | 421 | { |
422 | rpc_wake_up_queued_task(task->tk_waitqueue, task); | 422 | rpc_wake_up_queued_task(task->tk_waitqueue, task); |
423 | } | 423 | } |
424 | EXPORT_SYMBOL_GPL(rpc_wake_up_task); | ||
425 | 424 | ||
426 | /* | 425 | /* |
427 | * Wake up the next task on a priority queue. | 426 | * Wake up the next task on a priority queue. |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 96c212ddc41a..6e2772217e55 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -472,7 +472,7 @@ void xprt_write_space(struct rpc_xprt *xprt) | |||
472 | if (xprt->snd_task) { | 472 | if (xprt->snd_task) { |
473 | dprintk("RPC: write space: waking waiting task on " | 473 | dprintk("RPC: write space: waking waiting task on " |
474 | "xprt %p\n", xprt); | 474 | "xprt %p\n", xprt); |
475 | rpc_wake_up_task(xprt->snd_task); | 475 | rpc_wake_up_queued_task(&xprt->pending, xprt->snd_task); |
476 | } | 476 | } |
477 | spin_unlock_bh(&xprt->transport_lock); | 477 | spin_unlock_bh(&xprt->transport_lock); |
478 | } | 478 | } |
@@ -602,8 +602,7 @@ void xprt_force_disconnect(struct rpc_xprt *xprt) | |||
602 | /* Try to schedule an autoclose RPC call */ | 602 | /* Try to schedule an autoclose RPC call */ |
603 | if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0) | 603 | if (test_and_set_bit(XPRT_LOCKED, &xprt->state) == 0) |
604 | queue_work(rpciod_workqueue, &xprt->task_cleanup); | 604 | queue_work(rpciod_workqueue, &xprt->task_cleanup); |
605 | else if (xprt->snd_task != NULL) | 605 | xprt_wake_pending_tasks(xprt, -ENOTCONN); |
606 | rpc_wake_up_task(xprt->snd_task); | ||
607 | spin_unlock_bh(&xprt->transport_lock); | 606 | spin_unlock_bh(&xprt->transport_lock); |
608 | } | 607 | } |
609 | EXPORT_SYMBOL_GPL(xprt_force_disconnect); | 608 | EXPORT_SYMBOL_GPL(xprt_force_disconnect); |
@@ -749,18 +748,19 @@ EXPORT_SYMBOL_GPL(xprt_update_rtt); | |||
749 | void xprt_complete_rqst(struct rpc_task *task, int copied) | 748 | void xprt_complete_rqst(struct rpc_task *task, int copied) |
750 | { | 749 | { |
751 | struct rpc_rqst *req = task->tk_rqstp; | 750 | struct rpc_rqst *req = task->tk_rqstp; |
751 | struct rpc_xprt *xprt = req->rq_xprt; | ||
752 | 752 | ||
753 | dprintk("RPC: %5u xid %08x complete (%d bytes received)\n", | 753 | dprintk("RPC: %5u xid %08x complete (%d bytes received)\n", |
754 | task->tk_pid, ntohl(req->rq_xid), copied); | 754 | task->tk_pid, ntohl(req->rq_xid), copied); |
755 | 755 | ||
756 | task->tk_xprt->stat.recvs++; | 756 | xprt->stat.recvs++; |
757 | task->tk_rtt = (long)jiffies - req->rq_xtime; | 757 | task->tk_rtt = (long)jiffies - req->rq_xtime; |
758 | 758 | ||
759 | list_del_init(&req->rq_list); | 759 | list_del_init(&req->rq_list); |
760 | /* Ensure all writes are done before we update req->rq_received */ | 760 | /* Ensure all writes are done before we update req->rq_received */ |
761 | smp_wmb(); | 761 | smp_wmb(); |
762 | req->rq_received = req->rq_private_buf.len = copied; | 762 | req->rq_received = req->rq_private_buf.len = copied; |
763 | rpc_wake_up_task(task); | 763 | rpc_wake_up_queued_task(&xprt->pending, task); |
764 | } | 764 | } |
765 | EXPORT_SYMBOL_GPL(xprt_complete_rqst); | 765 | EXPORT_SYMBOL_GPL(xprt_complete_rqst); |
766 | 766 | ||