Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Sep 2016 12:06:43 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305595 - head/sys/ufs/ufs
Message-ID:  <201609081206.u88C6i8R016758@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609081206.u88C6i8R016758>