summaryrefslogtreecommitdiffstats
path: root/sys/isofs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-11-09 14:15:33 +0000
committerphk <phk@FreeBSD.org>1999-11-09 14:15:33 +0000
commit8c9bc6b1465e40acc6ad183f2048b478838442e7 (patch)
tree9ecaa92a6de6fdd1aeb455d59ce671785a1d0801 /sys/isofs
parent90188d1d4bda4b0a373a1823aa4a02e3f86da9c6 (diff)
downloadFreeBSD-src-8c9bc6b1465e40acc6ad183f2048b478838442e7.zip
FreeBSD-src-8c9bc6b1465e40acc6ad183f2048b478838442e7.tar.gz
Next step in the device cleanup process.
Correctly lock vnodes when calling VOP_OPEN() from filesystem mount code. Unify spec_open() for bdev and cdev cases. Remove the disabled bdev specific read/write code.
Diffstat (limited to 'sys/isofs')
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index f7d418d..8702879 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -296,8 +296,12 @@ iso_mountfs(devvp, mp, p, argp)
if ((error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0)))
return (error);
- if ((error = VOP_OPEN(devvp, FREAD, FSCRED, p)))
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p);
+ error = VOP_OPEN(devvp, FREAD, FSCRED, p);
+ VOP_UNLOCK(devvp, 0, p);
+ if (error)
return error;
+
needclose = 1;
/* This is the "logical sector size". The standard says this
@@ -523,7 +527,7 @@ cd9660_unmount(mp, mntflags, p)
{
register struct iso_mnt *isomp;
int error, flags = 0;
-
+
if (mntflags & MNT_FORCE)
flags |= FORCECLOSE;
#if 0
@@ -536,7 +540,6 @@ cd9660_unmount(mp, mntflags, p)
isomp = VFSTOISOFS(mp);
-
isomp->im_devvp->v_specmountpoint = NULL;
error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p);
vrele(isomp->im_devvp);
OpenPOWER on IntegriCloud