From owner-svn-src-all@FreeBSD.ORG Fri Apr 17 21:18:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AEC31065674; Fri, 17 Apr 2009 21:18:18 +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 C2DC28FC0A; Fri, 17 Apr 2009 21:18:17 +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 n3HLIHJ4034817; Fri, 17 Apr 2009 21:18:17 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3HLIHMD034816; Fri, 17 Apr 2009 21:18:17 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <200904172118.n3HLIHMD034816@svn.freebsd.org> From: Alexander Kabaev Date: Fri, 17 Apr 2009 21:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191224 - in releng/7.2/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 21:18:19 -0000 Author: kan Date: Fri Apr 17 21:18:17 2009 New Revision: 191224 URL: http://svn.freebsd.org/changeset/base/191224 Log: MFC r191218 and related backout r191220. More fallout from negative dotdot caching. Negative entries should be removed from and reinserted to proper ncneg list. Reported by: pho Submitted by: kib Approved by: re (kib) 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 Fri Apr 17 21:10:53 2009 (r191223) +++ releng/7.2/sys/kern/vfs_cache.c Fri Apr 17 21:18:17 2009 (r191224) @@ -535,18 +535,23 @@ cache_enter(dvp, vp, cnp) * to new parent vnode, otherwise continue with new * namecache entry allocation. */ - if ((ncp = dvp->v_cache_dd) != NULL) { - if (ncp->nc_flag & NCF_ISDOTDOT) { - KASSERT(ncp->nc_dvp == dvp, - ("wrong isdotdot parent")); + if ((ncp = dvp->v_cache_dd) != NULL && + ncp->nc_flag & NCF_ISDOTDOT) { + KASSERT(ncp->nc_dvp == dvp, + ("wrong isdotdot parent")); + if (ncp->nc_vp != NULL) TAILQ_REMOVE(&ncp->nc_vp->v_cache_dst, ncp, nc_dst); + else + TAILQ_REMOVE(&ncneg, ncp, nc_dst); + if (vp != NULL) TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst); - ncp->nc_vp = vp; - CACHE_UNLOCK(); - return; - } + else + TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst); + ncp->nc_vp = vp; + CACHE_UNLOCK(); + return; } dvp->v_cache_dd = NULL; CACHE_UNLOCK();