aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/sched.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 4a843b883b8..37452762af7 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -406,14 +406,6 @@ void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task
406EXPORT_SYMBOL_GPL(rpc_wake_up_queued_task); 406EXPORT_SYMBOL_GPL(rpc_wake_up_queued_task);
407 407
408/* 408/*
409 * Wake up the specified task
410 */
411static void rpc_wake_up_task(struct rpc_task *task)
412{
413 rpc_wake_up_queued_task(task->tk_waitqueue, task);
414}
415
416/*
417 * Wake up the next task on a priority queue. 409 * Wake up the next task on a priority queue.
418 */ 410 */
419static struct rpc_task * __rpc_wake_up_next_priority(struct rpc_wait_queue *queue) 411static struct rpc_task * __rpc_wake_up_next_priority(struct rpc_wait_queue *queue)
@@ -600,7 +592,15 @@ void rpc_exit_task(struct rpc_task *task)
600 } 592 }
601 } 593 }
602} 594}
603EXPORT_SYMBOL_GPL(rpc_exit_task); 595
596void rpc_exit(struct rpc_task *task, int status)
597{
598 task->tk_status = status;
599 task->tk_action = rpc_exit_task;
600 if (RPC_IS_QUEUED(task))
601 rpc_wake_up_queued_task(task->tk_waitqueue, task);
602}
603EXPORT_SYMBOL_GPL(rpc_exit);
604 604
605void rpc_release_calldata(const struct rpc_call_ops *ops, void *calldata) 605void rpc_release_calldata(const struct rpc_call_ops *ops, void *calldata)
606{ 606{
@@ -690,7 +690,6 @@ static void __rpc_execute(struct rpc_task *task)
690 dprintk("RPC: %5u got signal\n", task->tk_pid); 690 dprintk("RPC: %5u got signal\n", task->tk_pid);
691 task->tk_flags |= RPC_TASK_KILLED; 691 task->tk_flags |= RPC_TASK_KILLED;
692 rpc_exit(task, -ERESTARTSYS); 692 rpc_exit(task, -ERESTARTSYS);
693 rpc_wake_up_task(task);
694 } 693 }
695 rpc_set_running(task); 694 rpc_set_running(task);
696 dprintk("RPC: %5u sync task resuming\n", task->tk_pid); 695 dprintk("RPC: %5u sync task resuming\n", task->tk_pid);
@@ -950,7 +949,6 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
950 if (!(rovr->tk_flags & RPC_TASK_KILLED)) { 949 if (!(rovr->tk_flags & RPC_TASK_KILLED)) {
951 rovr->tk_flags |= RPC_TASK_KILLED; 950 rovr->tk_flags |= RPC_TASK_KILLED;
952 rpc_exit(rovr, -EIO); 951 rpc_exit(rovr, -EIO);
953 rpc_wake_up_task(rovr);
954 } 952 }
955 } 953 }
956 spin_unlock(&clnt->cl_lock); 954 spin_unlock(&clnt->cl_lock);