summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ufs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-09-22 09:04:05 +0000
committerkib <kib@FreeBSD.org>2016-09-22 09:04:05 +0000
commite681ce620b2b279c4208425dbf766f571109fa22 (patch)
tree78cdfd7205044e9898f6408e1067fec902ca500d /sys/ufs/ufs
parent83bcb87797d7cb539a41be90fa6266d0460ef77f (diff)
downloadFreeBSD-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/ufs')
-rw-r--r--sys/ufs/ufs/ufs_quota.c9
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);
OpenPOWER on IntegriCloud