Skip to content

Commit

Permalink
Revert "SUNRPC: Remove unreachable error condition"
Browse files Browse the repository at this point in the history
[ Upstream commit 13bd901 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
da-x authored and gregkh committed Sep 23, 2022
1 parent 4d9f296 commit c600874
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/sunrpc/clnt.c
Expand Up @@ -2858,6 +2858,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 c600874

Please sign in to comment.