cache: predict on no spurious slashes in cache_fpl_handle_root
This is a step towards speculatively not handling them.
This commit is contained in:
parent
30a2fc91fa
commit
7220a10b5b
@ -3623,9 +3623,15 @@ cache_fpl_handle_root(struct cache_fpl *fpl)
|
||||
ndp = fpl->ndp;
|
||||
cnp = fpl->cnp;
|
||||
|
||||
while (*(cnp->cn_nameptr) == '/') {
|
||||
cnp->cn_nameptr++;
|
||||
ndp->ni_pathlen--;
|
||||
MPASS(*(cnp->cn_nameptr) == '/');
|
||||
cnp->cn_nameptr++;
|
||||
ndp->ni_pathlen--;
|
||||
|
||||
if (__predict_false(*(cnp->cn_nameptr) == '/')) {
|
||||
do {
|
||||
cnp->cn_nameptr++;
|
||||
ndp->ni_pathlen--;
|
||||
} while (*(cnp->cn_nameptr) == '/');
|
||||
}
|
||||
|
||||
return (ndp->ni_rootdir);
|
||||
|
Loading…
Reference in New Issue
Block a user