diff options
author | kib <kib@FreeBSD.org> | 2016-09-22 10:47:56 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-09-22 10:47:56 +0000 |
commit | aa964bd26a74652772c75317ef270202bca14626 (patch) | |
tree | 8c9a9ce6c4a45942408a0328e397c61e46adaeee | |
parent | 25f8d877cbae74ef86bd5917295eca959e8e61b9 (diff) | |
download | FreeBSD-src-aa964bd26a74652772c75317ef270202bca14626.zip FreeBSD-src-aa964bd26a74652772c75317ef270202bca14626.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.
-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 7f11e54..d88f809 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -1542,8 +1542,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); |