diff options
author | kib <kib@FreeBSD.org> | 2016-09-22 09:04:05 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-09-22 09:04:05 +0000 |
commit | e681ce620b2b279c4208425dbf766f571109fa22 (patch) | |
tree | 78cdfd7205044e9898f6408e1067fec902ca500d /sys/ufs | |
parent | 83bcb87797d7cb539a41be90fa6266d0460ef77f (diff) | |
download | FreeBSD-src-e681ce620b2b279c4208425dbf766f571109fa22.zip FreeBSD-src-e681ce620b2b279c4208425dbf766f571109fa22.tar.gz |
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.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_quota.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index c236706..ccc4962 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -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); |