Commit eabf5baa authored by Fred Isaman's avatar Fred Isaman Committed by Trond Myklebust

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: default avatarFred Isaman <iisaman@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent cee6a537
...@@ -636,12 +636,6 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data) ...@@ -636,12 +636,6 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data)
rpc_task_set_client(task, task_setup_data->rpc_client); rpc_task_set_client(task, task_setup_data->rpc_client);
rpc_task_set_rpc_message(task, task_setup_data->rpc_message); rpc_task_set_rpc_message(task, task_setup_data->rpc_message);
if (task->tk_status != 0) {
int ret = task->tk_status;
rpc_put_task(task);
return ERR_PTR(ret);
}
if (task->tk_action == NULL) if (task->tk_action == NULL)
rpc_call_start(task); rpc_call_start(task);
......
...@@ -836,12 +836,6 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data) ...@@ -836,12 +836,6 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data)
} }
rpc_init_task(task, setup_data); rpc_init_task(task, setup_data);
if (task->tk_status < 0) {
int err = task->tk_status;
rpc_put_task(task);
return ERR_PTR(err);
}
task->tk_flags |= flags; task->tk_flags |= flags;
dprintk("RPC: allocated task %p\n", task); dprintk("RPC: allocated task %p\n", task);
return task; return task;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment