Skip to content

Commit 13bd901

Browse files
da-xTrond Myklebust
authored andcommitted
Revert "SUNRPC: Remove unreachable error condition"
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 <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent d7a5118 commit 13bd901

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/sunrpc/clnt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,6 +2873,9 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt,
28732873

28742874
task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_ASYNC,
28752875
&rpc_cb_add_xprt_call_ops, data);
2876+
if (IS_ERR(task))
2877+
return PTR_ERR(task);
2878+
28762879
data->xps->xps_nunique_destaddr_xprts++;
28772880
rpc_put_task(task);
28782881
success:

0 commit comments

Comments
 (0)