svn commit: r306177 - stable/10/sys/ufs/ffs

Konstantin Belousov kib at FreeBSD.org
Thu Sep 22 10:46:09 UTC 2016


Author: kib
Date: Thu Sep 22 10:46:08 2016
New Revision: 306177
URL: https://svnweb.freebsd.org/changeset/base/306177

Log:
  MFC r305594:
  In softdep_prealloc(), return early not only for snapshots, but for
  the quota files as well.

Modified:
  stable/10/sys/ufs/ffs/ffs_softdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- stable/10/sys/ufs/ffs/ffs_softdep.c	Thu Sep 22 10:44:56 2016	(r306176)
+++ stable/10/sys/ufs/ffs/ffs_softdep.c	Thu Sep 22 10:46:08 2016	(r306177)
@@ -2996,10 +2996,13 @@ softdep_prealloc(vp, waitok)
 	    ("softdep_prealloc called on non-softdep filesystem"));
 	/*
 	 * Nothing to do if we are not running journaled soft updates.
-	 * If we currently hold the snapshot lock, we must avoid handling
-	 * other resources that could cause deadlock.
+	 * If we currently hold the snapshot lock, we must avoid
+	 * handling other resources that could cause deadlock.  Do not
+	 * touch quotas vnode since it is typically recursed with
+	 * other vnode locks held.
 	 */
-	if (DOINGSUJ(vp) == 0 || IS_SNAPSHOT(VTOI(vp)))
+	if (DOINGSUJ(vp) == 0 || IS_SNAPSHOT(VTOI(vp)) ||
+	    (vp->v_vflag & VV_SYSTEM) != 0)
 		return (0);
 	ump = VFSTOUFS(vp->v_mount);
 	ACQUIRE_LOCK(ump);


More information about the svn-src-all mailing list