diff options
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r-- | net/sunrpc/sched.c | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 3fc8624fcd17..ffb687671da0 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -299,15 +299,8 @@ static void rpc_make_runnable(struct rpc_task *task) | |||
299 | if (rpc_test_and_set_running(task)) | 299 | if (rpc_test_and_set_running(task)) |
300 | return; | 300 | return; |
301 | if (RPC_IS_ASYNC(task)) { | 301 | if (RPC_IS_ASYNC(task)) { |
302 | int status; | ||
303 | |||
304 | INIT_WORK(&task->u.tk_work, rpc_async_schedule); | 302 | INIT_WORK(&task->u.tk_work, rpc_async_schedule); |
305 | status = queue_work(rpciod_workqueue, &task->u.tk_work); | 303 | queue_work(rpciod_workqueue, &task->u.tk_work); |
306 | if (status < 0) { | ||
307 | printk(KERN_WARNING "RPC: failed to add task to queue: error: %d!\n", status); | ||
308 | task->tk_status = status; | ||
309 | return; | ||
310 | } | ||
311 | } else | 304 | } else |
312 | wake_up_bit(&task->tk_runstate, RPC_TASK_QUEUED); | 305 | wake_up_bit(&task->tk_runstate, RPC_TASK_QUEUED); |
313 | } | 306 | } |
@@ -637,14 +630,12 @@ static void __rpc_execute(struct rpc_task *task) | |||
637 | save_callback = task->tk_callback; | 630 | save_callback = task->tk_callback; |
638 | task->tk_callback = NULL; | 631 | task->tk_callback = NULL; |
639 | save_callback(task); | 632 | save_callback(task); |
640 | } | 633 | } else { |
641 | 634 | /* | |
642 | /* | 635 | * Perform the next FSM step. |
643 | * Perform the next FSM step. | 636 | * tk_action may be NULL when the task has been killed |
644 | * tk_action may be NULL when the task has been killed | 637 | * by someone else. |
645 | * by someone else. | 638 | */ |
646 | */ | ||
647 | if (!RPC_IS_QUEUED(task)) { | ||
648 | if (task->tk_action == NULL) | 639 | if (task->tk_action == NULL) |
649 | break; | 640 | break; |
650 | task->tk_action(task); | 641 | task->tk_action(task); |
@@ -843,12 +834,6 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data) | |||
843 | } | 834 | } |
844 | 835 | ||
845 | rpc_init_task(task, setup_data); | 836 | rpc_init_task(task, setup_data); |
846 | if (task->tk_status < 0) { | ||
847 | int err = task->tk_status; | ||
848 | rpc_put_task(task); | ||
849 | return ERR_PTR(err); | ||
850 | } | ||
851 | |||
852 | task->tk_flags |= flags; | 837 | task->tk_flags |= flags; |
853 | dprintk("RPC: allocated task %p\n", task); | 838 | dprintk("RPC: allocated task %p\n", task); |
854 | return task; | 839 | return task; |