aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c11
1 files changed, 6 insertions, 5 deletions
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)
446 rpc_call_setup(task, msg, 0); 446 rpc_call_setup(task, msg, 0);
447 447
448 /* Set up the call info struct and execute the task */ 448 /* Set up the call info struct and execute the task */
449 if (task->tk_status == 0) { 449 status = task->tk_status;
450 if (status == 0) {
451 atomic_inc(&task->tk_count);
450 status = rpc_execute(task); 452 status = rpc_execute(task);
451 } else { 453 if (status == 0)
452 status = task->tk_status; 454 status = task->tk_status;
453 rpc_release_task(task);
454 } 455 }
455
456 rpc_restore_sigmask(&oldset); 456 rpc_restore_sigmask(&oldset);
457 rpc_release_task(task);
457out: 458out:
458 return status; 459 return status;
459} 460}