From owner-svn-src-stable-7@FreeBSD.ORG Wed Apr 15 16:05:26 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E72E106566B; Wed, 15 Apr 2009 16:05:26 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0587A8FC12; Wed, 15 Apr 2009 16:05:26 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3FG5Pec047365; Wed, 15 Apr 2009 16:05:25 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3FG5Per047364; Wed, 15 Apr 2009 16:05:25 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <200904151605.n3FG5Per047364@svn.freebsd.org> From: Alexander Kabaev Date: Wed, 15 Apr 2009 16:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191106 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 16:05:27 -0000 Author: kan Date: Wed Apr 15 16:05:25 2009 New Revision: 191106 URL: http://svn.freebsd.org/changeset/base/191106 Log: MFC r191081-191082: Properly handle negative cache enries found through dotdot lookups. Submitted by: tor Approved by: re(kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_cache.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Wed Apr 15 15:02:37 2009 (r191105) +++ stable/7/sys/kern/vfs_cache.c Wed Apr 15 16:05:25 2009 (r191106) @@ -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++;