From 7301b27b15444bfd41ba0a72e735b5a8583afe5f Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sun, 21 Dec 1997 21:40:02 +0000 Subject: [PATCH] Properly clean out the SI_MOUNTEDON flag iff the mount attempt fails half the way down. Otherwise, further attempts to mount the device will be rejected with BUSY. IMHO, this flag can completely go away for cd9660. There's no reason you need to prevent CDs from being mounted multiple times, and in case of multisession CDs it can even make sense to mount two different sessions by the same time (to different mount points, otherwise it would be pointless ;). --- sys/fs/cd9660/cd9660_vfsops.c | 3 ++- sys/isofs/cd9660/cd9660_vfsops.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 4bc152e0d20a..583d66c62015 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.31 1997/10/16 10:47:43 phk Exp $ + * $Id: cd9660_vfsops.c,v 1.32 1997/11/07 08:52:51 phk Exp $ */ #include @@ -436,6 +436,7 @@ iso_mountfs(devvp, mp, p, argp) return 0; out: + devvp->v_specflags &= ~SI_MOUNTEDON; if (bp) brelse(bp); if (needclose) diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 4bc152e0d20a..583d66c62015 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.31 1997/10/16 10:47:43 phk Exp $ + * $Id: cd9660_vfsops.c,v 1.32 1997/11/07 08:52:51 phk Exp $ */ #include @@ -436,6 +436,7 @@ iso_mountfs(devvp, mp, p, argp) return 0; out: + devvp->v_specflags &= ~SI_MOUNTEDON; if (bp) brelse(bp); if (needclose)