aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2011-02-11 10:42:36 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 15:38:40 -0500
commiteabf5baaaaf41b6a0273043cfb06d53dca67acef (patch)
treed3af759bccd76ecb3b1f1b5ec027193051b55734 /net/sunrpc
parentcee6a5372f8804f58acc87f07816f64db36718e2 (diff)
RPC: clarify rpc_run_task error handling
rpc_run_task can only fail if it is not passed in a preallocated task. However, that is not at all clear with the current code. So remove several impossible to occur failure checks. Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/clnt.c6
-rw-r--r--net/sunrpc/sched.c6
2 files changed, 0 insertions, 12 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 57d344cf2256..8b5a6b40d37c 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -636,12 +636,6 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data)
636 rpc_task_set_client(task, task_setup_data->rpc_client); 636 rpc_task_set_client(task, task_setup_data->rpc_client);
637 rpc_task_set_rpc_message(task, task_setup_data->rpc_message); 637 rpc_task_set_rpc_message(task, task_setup_data->rpc_message);
638 638
639 if (task->tk_status != 0) {
640 int ret = task->tk_status;
641 rpc_put_task(task);
642 return ERR_PTR(ret);
643 }
644
645 if (task->tk_action == NULL) 639 if (task->tk_action == NULL)
646 rpc_call_start(task); 640 rpc_call_start(task);
647 641
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 93107265256d..5681c6a12d20 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -836,12 +836,6 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data)
836 } 836 }
837 837
838 rpc_init_task(task, setup_data); 838 rpc_init_task(task, setup_data);
839 if (task->tk_status < 0) {
840 int err = task->tk_status;
841 rpc_put_task(task);
842 return ERR_PTR(err);
843 }
844
845 task->tk_flags |= flags; 839 task->tk_flags |= flags;
846 dprintk("RPC: allocated task %p\n", task); 840 dprintk("RPC: allocated task %p\n", task);
847 return task; 841 return task;