summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cache.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2009-04-14 23:56:48 +0000
committerkan <kan@FreeBSD.org>2009-04-14 23:56:48 +0000
commit9761044c2fc6921d742d0406e7a00f0d33ece295 (patch)
treeb0b5aab86814fb84115d4f207b4aefe2e61260d5 /sys/kern/vfs_cache.c
parent3d27e1410d9f91970abd08abfdcb08ef819417ed (diff)
downloadFreeBSD-src-9761044c2fc6921d742d0406e7a00f0d33ece295.zip
FreeBSD-src-9761044c2fc6921d742d0406e7a00f0d33ece295.tar.gz
Redo previous change using simpler patch that happens to be also
more correct. Submitted by: tor
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r--sys/kern/vfs_cache.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index f00307c..a541d76 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -423,15 +423,8 @@ retry_wlocked:
*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 @@ retry_wlocked:
goto success;
}
+negative_success:
/* We found a negative match, and want to create it, so purge */
if (cnp->cn_nameiop == CREATE) {
numnegzaps++;
OpenPOWER on IntegriCloud