Date: Fri, 17 Apr 2009 21:18:17 +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: r191224 - in releng/7.2/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern Message-ID: <200904172118.n3HLIHMD034816@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904172118.n3HLIHMD034816>