]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nfsd: simplify nfsd_renew
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 21 Jan 2021 22:57:39 +0000 (17:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:52:56 +0000 (14:52 +0200)
[ Upstream commit b4587eb2cf4b6271f67fb93b75f7de2a2026e853 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4state.c

index 15ed72b0ef55b10c49d8445c35dd77d5d1b385d2..574c88a9da268d3bfcc1e465857107f9c95f8d61 100644 (file)
@@ -5322,15 +5322,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