From owner-svn-src-stable-8@FreeBSD.ORG Mon Nov 7 23:09:18 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C836C106564A; Mon, 7 Nov 2011 23:09:18 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7D2D8FC0C; Mon, 7 Nov 2011 23:09:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA7N9Irj000845; Mon, 7 Nov 2011 23:09:18 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA7N9IeU000843; Mon, 7 Nov 2011 23:09:18 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201111072309.pA7N9IeU000843@svn.freebsd.org> From: Peter Holm Date: Mon, 7 Nov 2011 23:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227325 - stable/8/sys/ufs/ufs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2011 23:09:18 -0000 Author: pho Date: Mon Nov 7 23:09:18 2011 New Revision: 227325 URL: http://svn.freebsd.org/changeset/base/227325 Log: MFC r226967, r226971: Added missing cache purge of from argument. Modified: stable/8/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_vnops.c Mon Nov 7 22:58:49 2011 (r227324) +++ stable/8/sys/ufs/ufs/ufs_vnops.c Mon Nov 7 23:09:18 2011 (r227325) @@ -1512,6 +1512,15 @@ relock: cache_purge(fdvp); } error = ufs_dirremove(fdvp, fip, fcnp->cn_flags, 0); + /* + * The kern_renameat() looks up the fvp using the DELETE flag, which + * causes the removal of the name cache entry for fvp. + * As the relookup of the fvp is done in two steps: + * ufs_lookup_ino() and then VFS_VGET(), another thread might do a + * normal lookup of the from name just before the VFS_VGET() call, + * causing the cache entry to be re-instantiated. + */ + cache_purge(fvp); unlockout: vput(fdvp);