summaryrefslogtreecommitdiff
path: root/sys/msdosfs
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-12-19 00:27:18 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-12-19 00:27:18 +0000
commit20223e980d9e90e1b19206fac6fd99b3de16c00b (patch)
treecddfbd3e432c61855097e75aba7f6c44655fe337 /sys/msdosfs
parenta071d2844b0aca1fbdd02c554f6f4dbff82b2fcc (diff)
Re-introduce the remaining bits of thib@'s Aug 2006 VOP_CLOSE()
locking fixes. Tweak cd9660 code to be the same as everywhere else, no functional change. ok beck@
Diffstat (limited to 'sys/msdosfs')
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index 3e828b33f2f..20f0ad8fc63 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vfsops.c,v 1.55 2009/10/31 12:00:08 fgsch Exp $ */
+/* $OpenBSD: msdosfs_vfsops.c,v 1.56 2009/12/19 00:27:17 krw Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.48 1997/10/18 02:54:57 briggs Exp $ */
/*-
@@ -548,7 +548,11 @@ 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);