summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c20
-rw-r--r--sys/isofs/udf/udf_vfsops.c5
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c8
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c8
4 files changed, 11 insertions, 30 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index 7bdf1faa5d6..95a2d6f45a3 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vfsops.c,v 1.41 2006/08/06 18:42:01 thib Exp $ */
+/* $OpenBSD: cd9660_vfsops.c,v 1.42 2006/08/07 15:50:42 pedro Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */
/*-
@@ -251,10 +251,7 @@ iso_mountfs(devvp, mp, p, argp)
return (error);
if (vcount(devvp) > 1 && devvp != rootvp)
return (EBUSY);
- vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
- error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0);
- VOP_UNLOCK(devvp, 0, p);
- if (error != 0);
+ if ((error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0)) != 0)
return (error);
error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);
@@ -433,11 +430,9 @@ out:
brelse(bp);
if (supbp)
brelse(supbp);
- if (needclose) {
- vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
- VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
- VOP_UNLOCK(devvp, 0, p);
- }
+ if (needclose)
+ (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED,
+ p);
if (isomp) {
free((caddr_t)isomp, M_ISOFSMNT);
mp->mnt_data = (qaddr_t)0;
@@ -572,11 +567,8 @@ cd9660_unmount(mp, mntflags, p)
#endif
isomp->im_devvp->v_specmountpoint = NULL;
-
- vn_lock(isomp->im_devvp, LK_EXCLUSIVE|LK_RETRY, p);
error = VOP_CLOSE(isomp->im_devvp, FREAD, NOCRED, p);
- vput(isomp->im_devvp);
-
+ vrele(isomp->im_devvp);
free((caddr_t)isomp, M_ISOFSMNT);
mp->mnt_data = (qaddr_t)0;
mp->mnt_flag &= ~MNT_LOCAL;
diff --git a/sys/isofs/udf/udf_vfsops.c b/sys/isofs/udf/udf_vfsops.c
index 75777c404b7..fe665d99bb4 100644
--- a/sys/isofs/udf/udf_vfsops.c
+++ b/sys/isofs/udf/udf_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udf_vfsops.c,v 1.22 2006/08/06 18:42:01 thib Exp $ */
+/* $OpenBSD: udf_vfsops.c,v 1.23 2006/08/07 15:50:42 pedro Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
@@ -401,10 +401,7 @@ bail:
}
if (bp != NULL)
brelse(bp);
-
- vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
VOP_CLOSE(devvp, FREAD, FSCRED, p);
- VOP_UNLOCK(devvp, 0, p);
return (error);
}
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index 42945651bd0..f4da4125379 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.38 2006/08/06 18:42:01 thib Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.39 2006/08/07 15:50:42 pedro Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -593,9 +593,7 @@ error_exit:
devvp->v_specmountpoint = NULL;
if (bp)
brelse(bp);
- vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
(void) VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
- VOP_UNLOCK(devvp, 0, p);
if (pmp) {
if (pmp->pm_inusemap)
free(pmp->pm_inusemap, M_MSDOSFSFAT);
@@ -641,11 +639,9 @@ msdosfs_unmount(mp, mntflags, p)
#ifdef MSDOSFS_DEBUG
vprint("msdosfs_umount(): just before calling VOP_CLOSE()\n", vp);
#endif
- vn_lock(vp, LK_EXCLUSIVE|LK_RETRY, p);
error = VOP_CLOSE(vp,
pmp->pm_flags & MSDOSFSMNT_RONLY ? FREAD : FREAD|FWRITE, NOCRED, p);
- vput(vp);
-
+ vrele(vp);
free(pmp->pm_inusemap, M_MSDOSFSFAT);
free(pmp, M_MSDOSFSMNT);
mp->mnt_data = (qaddr_t)0;
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 101498d00e6..4444bae05dd 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.95 2006/08/06 18:42:01 thib Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.96 2006/08/07 15:50:42 pedro Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -898,9 +898,7 @@ out:
devvp->v_specmountpoint = NULL;
if (bp)
brelse(bp);
- vn_lock(devvp, LK_EXCLUSIVE|LK_RETRY, p);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, p);
- VOP_UNLOCK(devvp, 0, p);
if (ump) {
free(ump->um_fs, M_UFSMNT);
free(ump, M_UFSMNT);
@@ -974,12 +972,10 @@ ffs_unmount(struct mount *mp, int mntflags, struct proc *p)
}
ump->um_devvp->v_specmountpoint = NULL;
- vn_lock(ump->um_devvp, LK_EXCLUSIVE|LK_RETRY, p);
vinvalbuf(ump->um_devvp, V_SAVE, NOCRED, p, 0, 0);
error = VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE,
NOCRED, p);
- vput(ump->um_devvp);
-
+ vrele(ump->um_devvp);
free(fs->fs_csp, M_UFSMNT);
free(fs, M_UFSMNT);
free(ump, M_UFSMNT);