Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Nov 2011 23:09:18 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r227325 - stable/8/sys/ufs/ufs
Message-ID:  <201111072309.pA7N9IeU000843@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111072309.pA7N9IeU000843>