Skip to content

Commit

Permalink
NFSv4: Remove unreachable error condition due to rpc_run_task()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sherlly authored and Trond Myklebust committed Apr 25, 2020
1 parent efe57fd commit 6e47666
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9191,8 +9191,7 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout)
nfs4_init_sequence(&lgp->args.seq_args, &lgp->res.seq_res, 0, 0);

task = rpc_run_task(&task_setup_data);
if (IS_ERR(task))
return ERR_CAST(task);

status = rpc_wait_for_completion_task(task);
if (status != 0)
goto out;
Expand Down

0 comments on commit 6e47666

Please sign in to comment.