Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Sep 2016 10:47:56 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r306178 - stable/10/sys/ufs/ufs
Message-ID:  <201609221047.u8MAluFv054380@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Sep 22 10:47:56 2016
New Revision: 306178
URL: https://svnweb.freebsd.org/changeset/base/306178

Log:
  MFC r305595:
  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.

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

Modified: stable/10/sys/ufs/ufs/ufs_quota.c
==============================================================================
--- stable/10/sys/ufs/ufs/ufs_quota.c	Thu Sep 22 10:46:08 2016	(r306177)
+++ stable/10/sys/ufs/ufs/ufs_quota.c	Thu Sep 22 10:47:56 2016	(r306178)
@@ -1542,8 +1542,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?201609221047.u8MAluFv054380>