Skip to content

Commit

Permalink
Revert "SUNRPC: Remove unreachable error condition"
Browse files Browse the repository at this point in the history
This reverts commit efe57fd.

The assumption that it is impossible to return an ERR pointer from
rpc_run_task() no longer holds due to commit 25cf32a ("SUNRPC:
Handle allocation failure in rpc_new_task()").

Fixes: 25cf32a ('SUNRPC: Handle allocation failure in rpc_new_task()')
Fixes: efe57fd ('SUNRPC: Remove unreachable error condition')
Signed-off-by: Dan Aloni <dan.aloni@vastdata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Dan Aloni authored and Trond Myklebust committed Sep 8, 2022
1 parent d7a5118 commit 13bd901
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 13bd901

Please sign in to comment.