aboutsummaryrefslogtreecommitdiff
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-25 18:32:34 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:31 -0500
commitb3ef8b3bb93300e58a4c4806207de3de4eb76f48 (patch)
treed02db9d538477b5a98abcb7945dbf81fa9b8e4ec /net/sunrpc/sched.c
parent77de2c590ec72828156d85fa13a96db87301cc68 (diff)
SUNRPC: Allow rpc_init_task() to initialise the rpc_task->tk_msg
In preparation for the removal of rpc_call_setup(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r--net/sunrpc/sched.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index b9061bcf6fc..fa53a88b2c5 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -848,6 +848,17 @@ void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *task_setu
if (task->tk_ops->rpc_call_prepare != NULL)
task->tk_action = rpc_prepare_task;
+ if (task_setup_data->rpc_message != NULL) {
+ memcpy(&task->tk_msg, task_setup_data->rpc_message, sizeof(task->tk_msg));
+ /* Bind the user cred */
+ if (task->tk_msg.rpc_cred != NULL)
+ rpcauth_holdcred(task);
+ else
+ rpcauth_bindcred(task);
+ if (task->tk_action == NULL)
+ rpc_call_start(task);
+ }
+
/* starting timestamp */
task->tk_start = jiffies;