diff options
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index aba528b9ae76..16c9fbc1db69 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -490,16 +490,14 @@ int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) | |||
490 | 490 | ||
491 | /* Set up the call info struct and execute the task */ | 491 | /* Set up the call info struct and execute the task */ |
492 | status = task->tk_status; | 492 | status = task->tk_status; |
493 | if (status != 0) { | 493 | if (status != 0) |
494 | rpc_release_task(task); | ||
495 | goto out; | 494 | goto out; |
496 | } | ||
497 | atomic_inc(&task->tk_count); | 495 | atomic_inc(&task->tk_count); |
498 | status = rpc_execute(task); | 496 | status = rpc_execute(task); |
499 | if (status == 0) | 497 | if (status == 0) |
500 | status = task->tk_status; | 498 | status = task->tk_status; |
501 | rpc_put_task(task); | ||
502 | out: | 499 | out: |
500 | rpc_put_task(task); | ||
503 | rpc_restore_sigmask(&oldset); | 501 | rpc_restore_sigmask(&oldset); |
504 | return status; | 502 | return status; |
505 | } | 503 | } |
@@ -537,7 +535,7 @@ rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, int flags, | |||
537 | if (status == 0) | 535 | if (status == 0) |
538 | rpc_execute(task); | 536 | rpc_execute(task); |
539 | else | 537 | else |
540 | rpc_release_task(task); | 538 | rpc_put_task(task); |
541 | 539 | ||
542 | rpc_restore_sigmask(&oldset); | 540 | rpc_restore_sigmask(&oldset); |
543 | return status; | 541 | return status; |