svn commit: r305595 - head/sys/ufs/ufs

Konstantin Belousov kib at FreeBSD.org
Thu Sep 8 12:06:45 UTC 2016


Author: kib
Date: Thu Sep  8 12:06:43 2016
New Revision: 305595
URL: https://svnweb.freebsd.org/changeset/base/305595

Log:
  In dqsync(), when called from quotactl(), um_quotas entry might appear
  cleared since nothing prevents completion of the parallel quotaoff.
  There is nothing to sync in this case, and no reason to panic.
  
  Reported and tested by:	pho
  Reviewed by:	mckusick
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/ufs/ufs/ufs_quota.c

Modified: head/sys/ufs/ufs/ufs_quota.c
==============================================================================
--- head/sys/ufs/ufs/ufs_quota.c	Thu Sep  8 12:05:13 2016	(r305594)
+++ head/sys/ufs/ufs/ufs_quota.c	Thu Sep  8 12:06:43 2016	(r305595)
@@ -1538,8 +1538,13 @@ dqsync(struct vnode *vp, struct dquot *d
 	if ((ump = dq->dq_ump) == NULL)
 		return (0);
 	UFS_LOCK(ump);
-	if ((dqvp = ump->um_quotas[dq->dq_type]) == NULLVP)
-		panic("dqsync: file");
+	if ((dqvp = ump->um_quotas[dq->dq_type]) == NULLVP) {
+		if (vp == NULL) {
+			UFS_UNLOCK(ump);
+			return (0);
+		} else
+			panic("dqsync: file");
+	}
 	vref(dqvp);
 	UFS_UNLOCK(ump);
 


More information about the svn-src-head mailing list