]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/sunrpc/sched.c
SUNRPC: Allow rpc_init_task() to initialise the rpc_task->tk_msg
[mv-sheeva.git] / net / sunrpc / sched.c
index b9061bcf6fc155cce2eaa2e582b0c7168967f344..fa53a88b2c5bd4afd3a5869aaf4eb647c6776ac4 100644 (file)
@@ -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;