From 37890de0aac40567999d70fc1f3d94e8d6030d35 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 16 Sep 2008 16:15:38 +0000 Subject: vdropl() drops the vnode interlock. Thus, the code in the QUOTA case that upgrades the vnode lock if it is share locked was dropping the interlock before actually checking VI_DOOMED. Fix this by do the vdropl() after the check and relying on it to drop the vnode interlock. Reported by: pho Reviewed by: kib MFC after: 1 week --- sys/ufs/ufs/ufs_vnops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 506ab6a..904f553 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -335,13 +335,12 @@ ufs_access(ap) vhold(vp); vn_lock(vp, LK_UPGRADE | LK_RETRY); VI_LOCK(vp); - vdropl(vp); if (vp->v_iflag & VI_DOOMED) { - VI_UNLOCK(vp); + vdropl(vp); error = ENOENT; goto relock; } - VI_UNLOCK(vp); + vdropl(vp); } else relocked = 0; error = getinoquota(ip); -- cgit v1.1