nfsd: simplify nfsd_renew
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 21 Jan 2021 22:57:39 +0000 (17:57 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 25 Jan 2021 14:36:29 +0000 (09:36 -0500)
You can take the single-exit thing too far, I think.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4state.c

index 7ea63d7cec4deea96c64713d065837d460f54e53..ba955bbf21df97afb303d73c302bb45ef95993f0 100644 (file)
@@ -5300,15 +5300,12 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
        trace_nfsd_clid_renew(clid);
        status = lookup_clientid(clid, cstate, nn, false);
        if (status)
-               goto out;
+               return status;
        clp = cstate->clp;
-       status = nfserr_cb_path_down;
        if (!list_empty(&clp->cl_delegations)
                        && clp->cl_cb_state != NFSD4_CB_UP)
-               goto out;
-       status = nfs_ok;
-out:
-       return status;
+               return nfserr_cb_path_down;
+       return nfs_ok;
 }
 
 void