]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
SUNRPC: rpc_execute should not return task->tk_status;
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 3 Jan 2006 08:55:10 +0000 (09:55 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 6 Jan 2006 19:58:42 +0000 (14:58 -0500)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/clnt.c
net/sunrpc/sched.c

index 8b2f75bc006dedc955960dcadb48b264b879c41a..f025b7e72353f38879a9dadec4e960c377ed9699 100644 (file)
@@ -446,14 +446,15 @@ int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
        rpc_call_setup(task, msg, 0);
 
        /* Set up the call info struct and execute the task */
-       if (task->tk_status == 0) {
+       status = task->tk_status;
+       if (status == 0) {
+               atomic_inc(&task->tk_count);
                status = rpc_execute(task);
-       } else {
-               status = task->tk_status;
-               rpc_release_task(task);
+               if (status == 0)
+                       status = task->tk_status;
        }
-
        rpc_restore_sigmask(&oldset);
+       rpc_release_task(task);
 out:
        return status;
 }
index 82d158dad16de78201596c3b3d81fe5fca0dfaf5..48510e3ffa02a3aff8ad0714011ab5433494b971 100644 (file)
@@ -694,9 +694,7 @@ static int __rpc_execute(struct rpc_task *task)
                dprintk("RPC: %4d sync task resuming\n", task->tk_pid);
        }
 
-       dprintk("RPC: %4d exit() = %d\n", task->tk_pid, task->tk_status);
-       status = task->tk_status;
-
+       dprintk("RPC: %4d, return %d, status %d\n", task->tk_pid, status, task->tk_status);
        /* Wake up anyone who is waiting for task completion */
        rpc_mark_complete_task(task);
        /* Release all resources associated with the task */