Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192313
b: refs/heads/master
c: 19445b9
h: refs/heads/master
i:
  192311: 67e4804
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed May 14, 2010
1 parent a802b33 commit aaa3add
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee5ebe851ed60206f150d3f189416f9c63245b66
refs/heads/master: 19445b99b6d66af661c586c052de23110731a502
19 changes: 4 additions & 15 deletions trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,26 +556,16 @@ static const struct rpc_call_ops rpc_default_ops = {
*/
struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data)
{
struct rpc_task *task, *ret;
struct rpc_task *task;

task = rpc_new_task(task_setup_data);
if (task == NULL) {
rpc_release_calldata(task_setup_data->callback_ops,
task_setup_data->callback_data);
ret = ERR_PTR(-ENOMEM);
if (IS_ERR(task))
goto out;
}

if (task->tk_status != 0) {
ret = ERR_PTR(task->tk_status);
rpc_put_task(task);
goto out;
}
atomic_inc(&task->tk_count);
rpc_execute(task);
ret = task;
out:
return ret;
return task;
}
EXPORT_SYMBOL_GPL(rpc_run_task);

Expand Down Expand Up @@ -657,9 +647,8 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req,
* Create an rpc_task to send the data
*/
task = rpc_new_task(&task_setup_data);
if (!task) {
if (IS_ERR(task)) {
xprt_free_bc_request(req);
task = ERR_PTR(-ENOMEM);
goto out;
}
task->tk_rqstp = req;
Expand Down
13 changes: 10 additions & 3 deletions trunk/net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,16 +856,23 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data)

if (task == NULL) {
task = rpc_alloc_task();
if (task == NULL)
goto out;
if (task == NULL) {
rpc_release_calldata(setup_data->callback_ops,
setup_data->callback_data);
return ERR_PTR(-ENOMEM);
}
flags = RPC_TASK_DYNAMIC;
}

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;
dprintk("RPC: allocated task %p\n", task);
out:
return task;
}

Expand Down

0 comments on commit aaa3add

Please sign in to comment.