Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Apr 2009 23:46:58 +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: r191081 - head/sys/kern
Message-ID:  <200904142346.n3ENkwuK023749@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Tue Apr 14 23:46:57 2009
New Revision: 191081
URL: http://svn.freebsd.org/changeset/base/191081

Log:
  Fix yet another negative dotodot entry fallout.
  
  Reported by: pho

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Tue Apr 14 23:05:36 2009	(r191080)
+++ head/sys/kern/vfs_cache.c	Tue Apr 14 23:46:57 2009	(r191081)
@@ -421,6 +421,18 @@ retry_wlocked:
 				*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, "..",



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