summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-02-12 13:20:06 +0000
committerrwatson <rwatson@FreeBSD.org>2006-02-12 13:20:06 +0000
commitf05e8ac336412e3dc249b4917f13ba5d5fdc1c2d (patch)
tree5ed2ee803c2cf5ca0bf93f56a02cddde6b72771a /sys/ufs
parent92a26d2fa0b444abb65c382b5b0c875cc3f759cc (diff)
downloadFreeBSD-src-f05e8ac336412e3dc249b4917f13ba5d5fdc1c2d.zip
FreeBSD-src-f05e8ac336412e3dc249b4917f13ba5d5fdc1c2d.tar.gz
In quotaoff(), lock the vnode instead of asserting it when manipulating
v_vflags. MFC after: 1 week Submitted by: Antoine Brodin <antoine at brodin at laposte dot net>
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_quota.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index ecb0855..5ebeca8 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -536,8 +536,9 @@ again:
}
MNT_IUNLOCK(mp);
dqflush(qvp);
- ASSERT_VOP_LOCKED(qvp, "quotaoff");
+ vn_lock(qvp, LK_EXCLUSIVE | LK_RETRY, td);
qvp->v_vflag &= ~VV_SYSTEM;
+ VOP_UNLOCK(qvp, 0, td);
error = vn_close(qvp, FREAD|FWRITE, td->td_ucred, td);
ump->um_quotas[type] = NULLVP;
crfree(ump->um_cred[type]);
OpenPOWER on IntegriCloud