summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfssvc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-10-01 18:59:18 -0400
committerJ. Bruce Fields <bfields@redhat.com>2020-10-02 09:37:41 -0400
commit84c138e78d8ec247737d2c9e8dba50f20eb01a60 (patch)
tree94ddfdaa455d7d86bff99f08572903a58bf89bc7 /fs/nfsd/nfssvc.c
parentdcc46991d3c5b30a3944578511f9a51a71cc0078 (diff)
downloadlinux-84c138e78d8ec247737d2c9e8dba50f20eb01a60.tar.bz2
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 <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r--fs/nfsd/nfssvc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index b2d20920a998..3cdefb2294ce 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