mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 00:02:14 -04:00
vfs cache: garbage collect the fullpathfail2 counter
The conditions it checks cannot legally be true (modulo races against forced unmount), so assert on it instead.
This commit is contained in:
parent
9dc0c983b0
commit
07f52c4b5a
1 changed files with 1 additions and 9 deletions
|
|
@ -542,7 +542,6 @@ STATNODE_COUNTER(negzaps, numnegzaps,
|
|||
STATNODE_COUNTER(neghits, numneghits, "Number of cache hits (negative)");
|
||||
/* These count for vn_getcwd(), too. */
|
||||
STATNODE_COUNTER(fullpathcalls, numfullpathcalls, "Number of fullpath search calls");
|
||||
STATNODE_COUNTER(fullpathfail1, numfullpathfail1, "Number of fullpath search errors (ENOTDIR)");
|
||||
STATNODE_COUNTER(fullpathfail2, numfullpathfail2,
|
||||
"Number of fullpath search errors (VOP_VPTOCNP failures)");
|
||||
STATNODE_COUNTER(fullpathfail4, numfullpathfail4, "Number of fullpath search errors (ENOMEM)");
|
||||
|
|
@ -3400,14 +3399,7 @@ vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf,
|
|||
vp = vp1;
|
||||
continue;
|
||||
}
|
||||
if (vp->v_type != VDIR) {
|
||||
vrele(vp);
|
||||
counter_u64_add(numfullpathfail1, 1);
|
||||
error = ENOTDIR;
|
||||
SDT_PROBE3(vfs, namecache, fullpath, return,
|
||||
error, vp, NULL);
|
||||
break;
|
||||
}
|
||||
VNPASS(vp->v_type == VDIR || VN_IS_DOOMED(vp), vp);
|
||||
error = vn_vptocnp(&vp, buf, &buflen);
|
||||
if (error)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue