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>
This commit is contained in:
parent
dcc46991d3
commit
84c138e78d
@ -1030,12 +1030,12 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
|
|||||||
|
|
||||||
/* Check whether we have this call in the cache. */
|
/* Check whether we have this call in the cache. */
|
||||||
switch (nfsd_cache_lookup(rqstp)) {
|
switch (nfsd_cache_lookup(rqstp)) {
|
||||||
case RC_DROPIT:
|
case RC_DOIT:
|
||||||
return 0;
|
break;
|
||||||
case RC_REPLY:
|
case RC_REPLY:
|
||||||
return 1;
|
return 1;
|
||||||
case RC_DOIT:;
|
case RC_DROPIT:
|
||||||
/* do it */
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* need to grab the location to store the status, as
|
/* need to grab the location to store the status, as
|
||||||
|
Loading…
Reference in New Issue
Block a user