Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Apr 2009 16:36:13 +0000 (UTC)
From:      Alexander Kabaev <kan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r191107 - in releng/7.2/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern
Message-ID:  <200904151636.n3FGaDF2048045@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kan
Date: Wed Apr 15 16:36:13 2009
New Revision: 191107
URL: http://svn.freebsd.org/changeset/base/191107

Log:
  MFC r191081-191082:
  
  Properly handle negative cache enries found through dotdot lookups.
  
  Submitted by:	tegge
  Approved by:	re(kib)
  
  _M   sys
  M    sys/kern/vfs_cache.c
  _M   sys/dev/cxgb
  _M   sys/dev/ath/ath_hal
  _M   sys/contrib/pf

Modified:
  releng/7.2/sys/   (props changed)
  releng/7.2/sys/contrib/pf/   (props changed)
  releng/7.2/sys/dev/ath/ath_hal/   (props changed)
  releng/7.2/sys/dev/cxgb/   (props changed)
  releng/7.2/sys/kern/vfs_cache.c

Modified: releng/7.2/sys/kern/vfs_cache.c
==============================================================================
--- releng/7.2/sys/kern/vfs_cache.c	Wed Apr 15 16:05:25 2009	(r191106)
+++ releng/7.2/sys/kern/vfs_cache.c	Wed Apr 15 16:36:13 2009	(r191107)
@@ -370,6 +370,11 @@ retry:
 				*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) {
+				ncp = dvp->v_cache_dd;
+				goto negative_success;
+			}
 			CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
 			    dvp, cnp->cn_nameptr, *vpp);
 			goto success;
@@ -416,6 +421,7 @@ retry:
 		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?200904151636.n3FGaDF2048045>