Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79594
b: refs/heads/master
c: e8f5d77
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jan 30, 2008
1 parent 18a08c9 commit bf5ca9b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 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: b5627943ab6fabbc13a45d92683363a3d08a249f
refs/heads/master: e8f5d77c8029ff8f5dcd1dfc133aac0bbbffd92b
1 change: 1 addition & 0 deletions trunk/include/linux/sunrpc/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ struct rpc_call_ops {
};

struct rpc_task_setup {
struct rpc_task *task;
struct rpc_clnt *rpc_client;
const struct rpc_message *rpc_message;
const struct rpc_call_ops *callback_ops;
Expand Down
16 changes: 10 additions & 6 deletions trunk/net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,16 +885,20 @@ static void rpc_free_task(struct rcu_head *rcu)
*/
struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data)
{
struct rpc_task *task;

task = rpc_alloc_task();
if (!task)
goto out;
struct rpc_task *task = setup_data->task;
unsigned short flags = 0;

if (task == NULL) {
task = rpc_alloc_task();
if (task == NULL)
goto out;
flags = RPC_TASK_DYNAMIC;
}

rpc_init_task(task, setup_data);

task->tk_flags |= flags;
dprintk("RPC: allocated task %p\n", task);
task->tk_flags |= RPC_TASK_DYNAMIC;
out:
return task;
}
Expand Down

0 comments on commit bf5ca9b

Please sign in to comment.