From 8823f1b6db716d27bea88af1ab5adb536b3358bd Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Wed, 25 Sep 2002 02:44:55 +0000 Subject: [PATCH] - Don't use the interlock to protect v_writecount. --- sys/ufs/ufs/ufs_quota.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 57319f054b96..683169073cb5 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -447,16 +447,15 @@ quotaon(td, mp, type, fname) 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); - mtx_lock(&mntvnode_mtx); - continue; - } - if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) { + if (vget(vp, LK_EXCLUSIVE, td)) { mtx_lock(&mntvnode_mtx); goto again; } + if (vp->v_type == VNON || vp->v_writecount == 0) { + vput(vp); + mtx_lock(&mntvnode_mtx); + continue; + } error = getinoquota(VTOI(vp)); vput(vp); mtx_lock(&mntvnode_mtx);