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
This commit is contained in:
Konstantin Belousov 2016-09-08 12:06:43 +00:00
parent 60f1c000f3
commit e599d951e3

View File

@ -1538,8 +1538,13 @@ dqsync(struct vnode *vp, struct dquot *dq)
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);