cache: save a branch in cache_fplookup_next
Previously the code would branch on top find out whether it should branch on SDT probe and bumping the numposhits counter, depending on cache_fplookup_cross_mount. Arguably it should be done regardless of what said function returns.
This commit is contained in:
parent
eed1cc6cdf
commit
6d386b4c8a
@ -4748,16 +4748,14 @@ cache_fplookup_next(struct cache_fpl *fpl)
|
||||
return (cache_fpl_partial(fpl));
|
||||
}
|
||||
|
||||
if (cache_fplookup_is_mp(fpl)) {
|
||||
error = cache_fplookup_cross_mount(fpl);
|
||||
if (__predict_false(error != 0)) {
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
||||
counter_u64_add(numposhits, 1);
|
||||
SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, tvp);
|
||||
return (0);
|
||||
|
||||
error = 0;
|
||||
if (cache_fplookup_is_mp(fpl)) {
|
||||
error = cache_fplookup_cross_mount(fpl);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
Loading…
Reference in New Issue
Block a user