]> www.infradead.org Git - nvme.git/commitdiff
NFSv4: Remove unreachable error condition due to rpc_run_task()
authorXiyu Yang <xiyuyang19@fudan.edu.cn>
Sat, 25 Apr 2020 13:04:40 +0000 (21:04 +0800)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 25 Apr 2020 13:20:42 +0000 (09:20 -0400)
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 <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4proc.c

index 512afb1c786773761691ed6820b0f2268113d4e2..1c710a7834c24e55ac9deface1c2676bca170752 100644 (file)
@@ -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;