Redo previous change using simpler patch that happens to be also

more correct.

Submitted by: tor
This commit is contained in:
Alexander Kabaev 2009-04-14 23:56:48 +00:00
parent eed8a9edba
commit 9cf6772211
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=191082

View File

@ -423,15 +423,8 @@ cache_lookup(dvp, vpp, cnp)
*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);
ncp = dvp->v_cache_dd;
goto negative_success;
}
CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
dvp, cnp->cn_nameptr, *vpp);
@ -486,6 +479,7 @@ cache_lookup(dvp, vpp, cnp)
goto success;
}
negative_success:
/* We found a negative match, and want to create it, so purge */
if (cnp->cn_nameiop == CREATE) {
numnegzaps++;