diff options
-rw-r--r-- | fs/nfs/nfs4proc.c | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/sched.h | 1 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 2 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 3 | ||||
-rw-r--r-- | net/sunrpc/xprt.c | 10 |
5 files changed, 8 insertions, 10 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index b6db833f33e6..54743396b666 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2768,7 +2768,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server) | |||
2768 | rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL, NULL); | 2768 | rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL, NULL); |
2769 | nfs4_schedule_state_recovery(clp); | 2769 | nfs4_schedule_state_recovery(clp); |
2770 | if (test_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state) == 0) | 2770 | if (test_bit(NFS4CLNT_STATE_RECOVER, &clp->cl_state) == 0) |
2771 | rpc_wake_up_task(task); | 2771 | rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); |
2772 | task->tk_status = 0; | 2772 | task->tk_status = 0; |
2773 | return -EAGAIN; | 2773 | return -EAGAIN; |
2774 | case -NFS4ERR_DELAY: | 2774 | case -NFS4ERR_DELAY: |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 83f67779cf00..7963ef0ffb89 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -232,7 +232,6 @@ void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); | |||
232 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); | 232 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); |
233 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, | 233 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, |
234 | rpc_action action, rpc_action timer); | 234 | rpc_action action, rpc_action timer); |
235 | void rpc_wake_up_task(struct rpc_task *); | ||
236 | void rpc_wake_up_queued_task(struct rpc_wait_queue *, | 235 | void rpc_wake_up_queued_task(struct rpc_wait_queue *, |
237 | struct rpc_task *); | 236 | struct rpc_task *); |
238 | void rpc_wake_up(struct rpc_wait_queue *); | 237 | void rpc_wake_up(struct rpc_wait_queue *); |
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 | ||