Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3ef8b3bb93300e58a4c4806207de3de4eb76f48
Commit:     b3ef8b3bb93300e58a4c4806207de3de4eb76f48
Parent:     77de2c590ec72828156d85fa13a96db87301cc68
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 25 18:32:34 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 02:05:31 2008 -0500

    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 <[EMAIL PROTECTED]>
---
 net/sunrpc/clnt.c  |   11 ++++-------
 net/sunrpc/sched.c |   11 +++++++++++
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 7aeffee..6eb79c4 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -540,13 +540,10 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup 
*task_setup_data)
                goto out;
        }
 
-       if (task_setup_data->rpc_message != NULL) {
-               rpc_call_setup(task, task_setup_data->rpc_message, 0);
-               if (task->tk_status != 0) {
-                       ret = ERR_PTR(task->tk_status);
-                       rpc_put_task(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);
        /* Mask signals on synchronous RPC calls and RPCSEC_GSS upcalls */
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index b9061bc..fa53a88 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;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to