Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42501
b: refs/heads/master
c: bbd5a1f
h: refs/heads/master
i:
  42499: 20c18fd
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Dec 6, 2006
1 parent f861358 commit 28ff2ef
Show file tree
Hide file tree
Showing 4 changed files with 14 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: 3e32a5d99a467b9d4d416323c8c292479b4915e5
refs/heads/master: bbd5a1f9fc9fad0f8725812d91c51b052e847de8
1 change: 1 addition & 0 deletions trunk/include/linux/sunrpc/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt,
void rpc_put_task(struct rpc_task *);
void rpc_release_task(struct rpc_task *);
void rpc_exit_task(struct rpc_task *);
void rpc_release_calldata(const struct rpc_call_ops *, void *);
void rpc_killall_tasks(struct rpc_clnt *);
int rpc_execute(struct rpc_task *);
void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *);
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,7 @@ rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, int flags,
rpc_restore_sigmask(&oldset);
return status;
out_release:
if (tk_ops->rpc_release != NULL)
tk_ops->rpc_release(data);
rpc_release_calldata(tk_ops, data);
return status;
}

Expand Down
15 changes: 11 additions & 4 deletions trunk/net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,15 @@ void rpc_exit_task(struct rpc_task *task)
}
EXPORT_SYMBOL(rpc_exit_task);

void rpc_release_calldata(const struct rpc_call_ops *ops, void *calldata)
{
if (ops->rpc_release != NULL) {
lock_kernel();
ops->rpc_release(calldata);
unlock_kernel();
}
}

/*
* This is the RPC `scheduler' (or rather, the finite state machine).
*/
Expand Down Expand Up @@ -883,8 +892,7 @@ void rpc_put_task(struct rpc_task *task)
}
if (task->tk_flags & RPC_TASK_DYNAMIC)
call_rcu_bh(&task->u.tk_rcu, rpc_free_task);
if (tk_ops->rpc_release)
tk_ops->rpc_release(calldata);
rpc_release_calldata(tk_ops, calldata);
}
EXPORT_SYMBOL(rpc_put_task);

Expand Down Expand Up @@ -928,8 +936,7 @@ struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags,
struct rpc_task *task;
task = rpc_new_task(clnt, flags, ops, data);
if (task == NULL) {
if (ops->rpc_release != NULL)
ops->rpc_release(data);
rpc_release_calldata(ops, data);
return ERR_PTR(-ENOMEM);
}
atomic_inc(&task->tk_count);
Expand Down

0 comments on commit 28ff2ef

Please sign in to comment.