Skip to content

Commit 6e47666

Browse files
sherllyTrond Myklebust
authored andcommitted
NFSv4: Remove unreachable error condition due to rpc_run_task()
nfs4_proc_layoutget() invokes rpc_run_task(), which return the value to "task". Since rpc_run_task() is impossible to return an ERR pointer, there is no need to add the IS_ERR() condition on "task" here. So we need to remove it. Signed-off-by: Xiyu Yang <[email protected]> Signed-off-by: Xin Tan <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent efe57fd commit 6e47666

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/nfs/nfs4proc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9191,8 +9191,7 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout)
91919191
nfs4_init_sequence(&lgp->args.seq_args, &lgp->res.seq_res, 0, 0);
91929192

91939193
task = rpc_run_task(&task_setup_data);
9194-
if (IS_ERR(task))
9195-
return ERR_CAST(task);
9194+
91969195
status = rpc_wait_for_completion_task(task);
91979196
if (status != 0)
91989197
goto out;

0 commit comments

Comments
 (0)