From: Trond Myklebust Date: Tue, 3 Jan 2006 08:55:10 +0000 (+0100) Subject: SUNRPC: rpc_execute should not return task->tk_status; X-Git-Tag: MMI-PSA29.97-13-9~53664^2~4^2~48 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e60859ac0e50f660d23b72e42e05f58757dcfeff;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git SUNRPC: rpc_execute should not return task->tk_status; Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 8b2f75bc006d..f025b7e72353 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -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; } diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 82d158dad16d..48510e3ffa02 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -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 */