diff options
-rw-r--r-- | include/linux/sunrpc/sched.h | 7 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 20 |
2 files changed, 10 insertions, 17 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 7be4f3a6d246..88513fd8e208 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -213,6 +213,7 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req, | |||
213 | const struct rpc_call_ops *ops); | 213 | const struct rpc_call_ops *ops); |
214 | void rpc_put_task(struct rpc_task *); | 214 | void rpc_put_task(struct rpc_task *); |
215 | void rpc_exit_task(struct rpc_task *); | 215 | void rpc_exit_task(struct rpc_task *); |
216 | void rpc_exit(struct rpc_task *, int); | ||
216 | void rpc_release_calldata(const struct rpc_call_ops *, void *); | 217 | void rpc_release_calldata(const struct rpc_call_ops *, void *); |
217 | void rpc_killall_tasks(struct rpc_clnt *); | 218 | void rpc_killall_tasks(struct rpc_clnt *); |
218 | void rpc_execute(struct rpc_task *); | 219 | void rpc_execute(struct rpc_task *); |
@@ -241,12 +242,6 @@ void rpc_destroy_mempool(void); | |||
241 | extern struct workqueue_struct *rpciod_workqueue; | 242 | extern struct workqueue_struct *rpciod_workqueue; |
242 | void rpc_prepare_task(struct rpc_task *task); | 243 | void rpc_prepare_task(struct rpc_task *task); |
243 | 244 | ||
244 | static inline void rpc_exit(struct rpc_task *task, int status) | ||
245 | { | ||
246 | task->tk_status = status; | ||
247 | task->tk_action = rpc_exit_task; | ||
248 | } | ||
249 | |||
250 | static inline int rpc_wait_for_completion_task(struct rpc_task *task) | 245 | static inline int rpc_wait_for_completion_task(struct rpc_task *task) |
251 | { | 246 | { |
252 | return __rpc_wait_for_completion_task(task, NULL); | 247 | return __rpc_wait_for_completion_task(task, NULL); |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 4a843b883b89..37452762af70 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 | |||
406 | EXPORT_SYMBOL_GPL(rpc_wake_up_queued_task); | 406 | EXPORT_SYMBOL_GPL(rpc_wake_up_queued_task); |
407 | 407 | ||
408 | /* | 408 | /* |
409 | * Wake up the specified task | ||
410 | */ | ||
411 | static 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 | */ |
419 | static struct rpc_task * __rpc_wake_up_next_priority(struct rpc_wait_queue *queue) | 411 | static 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 | } |
603 | EXPORT_SYMBOL_GPL(rpc_exit_task); | 595 | |
596 | void 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 | } | ||
603 | EXPORT_SYMBOL_GPL(rpc_exit); | ||
604 | 604 | ||
605 | void rpc_release_calldata(const struct rpc_call_ops *ops, void *calldata) | 605 | void 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); |