From owner-svn-src-all@FreeBSD.ORG Mon Oct 31 15:01:48 2011 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 23E6A106564A; Mon, 31 Oct 2011 15:01:48 +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 1410E8FC17; Mon, 31 Oct 2011 15:01:48 +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 p9VF1lfi020690; Mon, 31 Oct 2011 15:01:47 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9VF1lrf020688; Mon, 31 Oct 2011 15:01:47 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201110311501.p9VF1lrf020688@svn.freebsd.org> From: Peter Holm Date: Mon, 31 Oct 2011 15:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226967 - head/sys/ufs/ufs 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: Mon, 31 Oct 2011 15:01:48 -0000 Author: pho Date: Mon Oct 31 15:01:47 2011 New Revision: 226967 URL: http://svn.freebsd.org/changeset/base/226967 Log: The kern_renameat() looks up the fvp using the DELETE flag, which causes the removal of the name cache entry for fvp. Reported by: Anton Yuzhaninov In collaboration with: kib MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Mon Oct 31 10:53:27 2011 (r226966) +++ head/sys/ufs/ufs/ufs_vnops.c Mon Oct 31 15:01:47 2011 (r226967) @@ -1519,6 +1519,13 @@ relock: cache_purge(fdvp); } error = ufs_dirremove(fdvp, fip, fcnp->cn_flags, 0); + /* + * 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);