aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/clnt.c11
-rw-r--r--net/sunrpc/sched.c4
2 files changed, 7 insertions, 8 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}
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)
694 dprintk("RPC: %4d sync task resuming\n", task->tk_pid); 694 dprintk("RPC: %4d sync task resuming\n", task->tk_pid);
695 } 695 }
696 696
697 dprintk("RPC: %4d exit() = %d\n", task->tk_pid, task->tk_status); 697 dprintk("RPC: %4d, return %d, status %d\n", task->tk_pid, status, task->tk_status);
698 status = task->tk_status;
699
700 /* Wake up anyone who is waiting for task completion */ 698 /* Wake up anyone who is waiting for task completion */
701 rpc_mark_complete_task(task); 699 rpc_mark_complete_task(task);
702 /* Release all resources associated with the task */ 700 /* Release all resources associated with the task */