aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2016-09-08 12:05:13 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2016-09-08 12:05:13 +0000
commit60f1c000f30d01ea8311d1cfb184106eb1542ba5 (patch)
treed6647b17455f23a1683237b7a1342fdf0e856351 /sys/ufs
parentccb19123e540582f4ebcd39fa63daeb637be6467 (diff)
downloadsrc-60f1c000f30d01ea8311d1cfb184106eb1542ba5.tar.gz
src-60f1c000f30d01ea8311d1cfb184106eb1542ba5.zip
In softdep_prealloc(), return early not only for snapshots, but for
the quota files as well. Reported and tested by: pho Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=305594
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_softdep.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index d06f5dee4341..122848dced7e 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -2997,10 +2997,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);