diff options
author | jhb <jhb@FreeBSD.org> | 2008-09-16 16:15:38 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-09-16 16:15:38 +0000 |
commit | 37890de0aac40567999d70fc1f3d94e8d6030d35 (patch) | |
tree | 7af82db421c7ba1ac9c31181203314c2dd2327ee | |
parent | 0f8f4f624b9601d63a980ccf5c07f3e3109f98cd (diff) | |
download | FreeBSD-src-37890de0aac40567999d70fc1f3d94e8d6030d35.zip FreeBSD-src-37890de0aac40567999d70fc1f3d94e8d6030d35.tar.gz |
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
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 5 |
1 files 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); |