summaryrefslogtreecommitdiffstats
path: root/sys/fs/cd9660
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-07-02 18:02:55 +0000
committerkib <kib@FreeBSD.org>2009-07-02 18:02:55 +0000
commit350f96b4bfb4f448e5d1daefbab2238552c76cf9 (patch)
tree1d1f89470a093cacfe161f84e5ec9c2a86b5abab /sys/fs/cd9660
parent9055b3da210645c5201faab9905fe4b81baab9a8 (diff)
downloadFreeBSD-src-350f96b4bfb4f448e5d1daefbab2238552c76cf9.zip
FreeBSD-src-350f96b4bfb4f448e5d1daefbab2238552c76cf9.tar.gz
In vn_vget_ino() and their inline equivalents, mnt_ref() the mount point
around the sequence that drop vnode lock and then busies the mount point. Not having vlocked node or direct reference to the mp allows for the forced unmount to proceed, making mp unmounted or reused. Tested by: pho Reviewed by: jeff Approved by: re (kensmith) MFC after: 2 weeks
Diffstat (limited to 'sys/fs/cd9660')
-rw-r--r--sys/fs/cd9660/cd9660_lookup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/cd9660/cd9660_lookup.c b/sys/fs/cd9660/cd9660_lookup.c
index e23d8f3..590fc19 100644
--- a/sys/fs/cd9660/cd9660_lookup.c
+++ b/sys/fs/cd9660/cd9660_lookup.c
@@ -376,9 +376,11 @@ found:
ltype = VOP_ISLOCKED(pdp);
error = vfs_busy(mp, MBF_NOWAIT);
if (error != 0) {
+ vfs_ref(mp);
VOP_UNLOCK(pdp, 0);
error = vfs_busy(mp, 0);
vn_lock(pdp, ltype | LK_RETRY);
+ vfs_rel(mp);
if (error)
return (ENOENT);
if (pdp->v_iflag & VI_DOOMED) {
OpenPOWER on IntegriCloud