From: Chuck Lever Date: Thu, 1 Oct 2020 22:59:18 +0000 (-0400) Subject: NFSD: Clean up switch statement in nfsd_dispatch() X-Git-Tag: v5.10-rc1~61^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=84c138e78d8ec247737d2c9e8dba50f20eb01a60;p=thirdparty%2Flinux.git NFSD: Clean up switch statement in nfsd_dispatch() Reorder the arms so the compiler places checks for the most frequent case first. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index b2d20920a9983..3cdefb2294cec 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -1030,12 +1030,12 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) /* Check whether we have this call in the cache. */ switch (nfsd_cache_lookup(rqstp)) { - case RC_DROPIT: - return 0; + case RC_DOIT: + break; case RC_REPLY: return 1; - case RC_DOIT:; - /* do it */ + case RC_DROPIT: + return 0; } /* need to grab the location to store the status, as