diff options
author | Dan Aloni <dan.aloni@vastdata.com> | 2022-09-08 17:08:51 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-09-08 18:11:23 +0300 |
commit | 13bd9014180425f5a35eaf3735971d582c299292 (patch) | |
tree | 4620209504bea191779352a03ce0fcde0080a45b | |
parent | d7a5118635e725d195843bda80cc5c964d93ef31 (diff) | |
download | linux-13bd9014180425f5a35eaf3735971d582c299292.tar.xz |
Revert "SUNRPC: Remove unreachable error condition"
This reverts commit efe57fd58e1cb77f9186152ee12a8aa4ae3348e0.
The assumption that it is impossible to return an ERR pointer from
rpc_run_task() no longer holds due to commit 25cf32ad5dba ("SUNRPC:
Handle allocation failure in rpc_new_task()").
Fixes: 25cf32ad5dba ('SUNRPC: Handle allocation failure in rpc_new_task()')
Fixes: efe57fd58e1c ('SUNRPC: Remove unreachable error condition')
Signed-off-by: Dan Aloni <dan.aloni@vastdata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r-- | net/sunrpc/clnt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 7d268a291486..c284efa3d1ef 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2873,6 +2873,9 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt, task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_ASYNC, &rpc_cb_add_xprt_call_ops, data); + if (IS_ERR(task)) + return PTR_ERR(task); + data->xps->xps_nunique_destaddr_xprts++; rpc_put_task(task); success: |