svn commit: r227402 - stable/9/sys/ufs/ufs

Peter Holm pho at FreeBSD.org
Wed Nov 9 18:51:41 UTC 2011


Author: pho
Date: Wed Nov  9 18:51:41 2011
New Revision: 227402
URL: http://svn.freebsd.org/changeset/base/227402

Log:
  MFC r226971
  Added missing cache purge of from argument.
  
  Approved by:	re (kensmith)

Modified:
  stable/9/sys/ufs/ufs/ufs_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/ufs/ufs/ufs_vnops.c
==============================================================================
--- stable/9/sys/ufs/ufs/ufs_vnops.c	Wed Nov  9 18:48:36 2011	(r227401)
+++ stable/9/sys/ufs/ufs/ufs_vnops.c	Wed Nov  9 18:51:41 2011	(r227402)
@@ -1519,6 +1519,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);


More information about the svn-src-stable-9 mailing list