Fix yet another negative dotodot entry fallout.

Reported by: pho
This commit is contained in:
Alexander Kabaev 2009-04-14 23:46:57 +00:00
parent 427ac07f05
commit eed8a9edba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191081

View File

@ -421,6 +421,18 @@ cache_lookup(dvp, vpp, cnp)
*vpp = dvp->v_cache_dd->nc_vp;
else
*vpp = dvp->v_cache_dd->nc_dvp;
/* Return failure if negative entry was found. */
if (*vpp == NULL) {
numneghits++;
nchstats.ncs_neghits++;
SDT_PROBE(vfs, namecache, lookup, hit_negative,
dvp, "..", 0, 0, 0);
if (wlocked)
CACHE_WUNLOCK();
else
CACHE_RUNLOCK();
return (ENOENT);
}
CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
dvp, cnp->cn_nameptr, *vpp);
SDT_PROBE(vfs, namecache, lookup, hit, dvp, "..",