svn commit: r227325 - stable/8/sys/ufs/ufs

Peter Holm pho at FreeBSD.org
Mon Nov 7 23:09:18 UTC 2011


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);


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