Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2009 23:56:48 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191082 - head/sys/kern
Message-ID:  <200904142356.n3ENumPX024020@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904142356.n3ENumPX024020>