summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/ufs/ufs/ufs_quota.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c
index 57319f0..6831690 100644
--- a/sys/ufs/ufs/ufs_quota.c
+++ b/sys/ufs/ufs/ufs_quota.c
@@ -447,15 +447,14 @@ again:
nextvp = TAILQ_NEXT(vp, v_nmntvnodes);
mtx_unlock(&mntvnode_mtx);
- mtx_lock(&vp->v_interlock);
- if (vp->v_type == VNON || vp->v_writecount == 0) {
- mtx_unlock(&vp->v_interlock);
+ if (vget(vp, LK_EXCLUSIVE, td)) {
mtx_lock(&mntvnode_mtx);
- continue;
+ goto again;
}
- if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) {
+ if (vp->v_type == VNON || vp->v_writecount == 0) {
+ vput(vp);
mtx_lock(&mntvnode_mtx);
- goto again;
+ continue;
}
error = getinoquota(VTOI(vp));
vput(vp);
OpenPOWER on IntegriCloud