RPC: Fix return value of rpc_call_async() RPC call async is supposed to return an error if and only if it failed to run the rpc_task. Signed-off-by: Trond Myklebust --- clnt.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) Index: linux-2.6.11-rc3/net/sunrpc/clnt.c =================================================================== --- linux-2.6.11-rc3.orig/net/sunrpc/clnt.c +++ linux-2.6.11-rc3/net/sunrpc/clnt.c @@ -406,12 +406,11 @@ rpc_call_async(struct rpc_clnt *clnt, st rpc_call_setup(task, msg, 0); /* Set up the call info struct and execute the task */ - if (task->tk_status == 0) - status = rpc_execute(task); - else { - status = task->tk_status; + status = task->tk_status; + if (status == 0) + rpc_execute(task); + else rpc_release_task(task); - } out: rpc_clnt_sigunmask(clnt, &oldset);