svn commit: r191082 - head/sys/kern
Alexander Kabaev
kan at FreeBSD.org
Tue Apr 14 23:56:49 UTC 2009
Author: kan
Date: Tue Apr 14 23:56:48 2009
New Revision: 191082
URL: http://svn.freebsd.org/changeset/base/191082
Log:
Redo previous change using simpler patch that happens to be also
more correct.
Submitted by: tor
Modified:
head/sys/kern/vfs_cache.c
Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c Tue Apr 14 23:46:57 2009 (r191081)
+++ head/sys/kern/vfs_cache.c Tue Apr 14 23:56:48 2009 (r191082)
@@ -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++;
More information about the svn-src-head
mailing list