diff options
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 6e71d6ace5a3..aa8965e9d307 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -495,15 +495,16 @@ rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, int flags, | |||
495 | int status; | 495 | int status; |
496 | 496 | ||
497 | /* If this client is slain all further I/O fails */ | 497 | /* If this client is slain all further I/O fails */ |
498 | status = -EIO; | ||
498 | if (clnt->cl_dead) | 499 | if (clnt->cl_dead) |
499 | return -EIO; | 500 | goto out_release; |
500 | 501 | ||
501 | flags |= RPC_TASK_ASYNC; | 502 | flags |= RPC_TASK_ASYNC; |
502 | 503 | ||
503 | /* Create/initialize a new RPC task */ | 504 | /* Create/initialize a new RPC task */ |
504 | status = -ENOMEM; | 505 | status = -ENOMEM; |
505 | if (!(task = rpc_new_task(clnt, flags, tk_ops, data))) | 506 | if (!(task = rpc_new_task(clnt, flags, tk_ops, data))) |
506 | goto out; | 507 | goto out_release; |
507 | 508 | ||
508 | /* Mask signals on GSS_AUTH upcalls */ | 509 | /* Mask signals on GSS_AUTH upcalls */ |
509 | rpc_task_sigmask(task, &oldset); | 510 | rpc_task_sigmask(task, &oldset); |
@@ -518,7 +519,10 @@ rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, int flags, | |||
518 | rpc_release_task(task); | 519 | rpc_release_task(task); |
519 | 520 | ||
520 | rpc_restore_sigmask(&oldset); | 521 | rpc_restore_sigmask(&oldset); |
521 | out: | 522 | return status; |
523 | out_release: | ||
524 | if (tk_ops->rpc_release != NULL) | ||
525 | tk_ops->rpc_release(data); | ||
522 | return status; | 526 | return status; |
523 | } | 527 | } |
524 | 528 | ||