diff options
author | dg <dg@FreeBSD.org> | 1994-08-20 16:03:26 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-20 16:03:26 +0000 |
commit | f817326b2eacf649d2b0d53d60ff2d4b6fd74577 (patch) | |
tree | e9031b5de5b5dd36f5609577351266694d3cb1ba /sys/ufs/lfs/lfs_vfsops.c | |
parent | a376cb63c72e1f3347c10ab96276fd745e816fea (diff) | |
download | FreeBSD-src-f817326b2eacf649d2b0d53d60ff2d4b6fd74577.zip FreeBSD-src-f817326b2eacf649d2b0d53d60ff2d4b6fd74577.tar.gz |
Implemented filesystem clean bit via:
machdep.c:
Changed printf's a little and call vfs_unmountall() if the sync was
successful.
cd9660_vfsops.c, ffs_vfsops.c, nfs_vfsops.c, lfs_vfsops.c:
Allow dismount of root FS. It is now disallowed at a higher level.
vfs_conf.c:
Removed unused rootfs global.
vfs_subr.c:
Added new routines vfs_unmountall and vfs_unmountroot. Filesystems
are now dismounted if the machine is properly rebooted.
ffs_vfsops.c:
Toggle clean bit at the appropriate places. Print warning if an
unclean FS is mounted.
ffs_vfsops.c, lfs_vfsops.c:
Fix bug in selecting proper flags for VOP_CLOSE().
vfs_syscalls.c:
Disallow dismounting root FS via umount syscall.
Diffstat (limited to 'sys/ufs/lfs/lfs_vfsops.c')
-rw-r--r-- | sys/ufs/lfs/lfs_vfsops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ufs/lfs/lfs_vfsops.c b/sys/ufs/lfs/lfs_vfsops.c index 0298666..72556d2 100644 --- a/sys/ufs/lfs/lfs_vfsops.c +++ b/sys/ufs/lfs/lfs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_vfsops.c 8.7 (Berkeley) 4/16/94 - * $Id: lfs_vfsops.c,v 1.3 1994/08/02 07:54:38 davidg Exp $ + * $Id: lfs_vfsops.c,v 1.4 1994/08/20 03:49:02 davidg Exp $ */ #include <sys/param.h> @@ -326,7 +326,7 @@ lfs_unmount(mp, mntflags, p) flags = 0; if (mntflags & MNT_FORCE) { - if (!doforce || (mp->mnt_flag & MNT_ROOTFS)) + if (!doforce) return (EINVAL); flags |= FORCECLOSE; } @@ -358,7 +358,7 @@ lfs_unmount(mp, mntflags, p) vrele(fs->lfs_ivnode); vgone(fs->lfs_ivnode); - ronly = !fs->lfs_ronly; + ronly = fs->lfs_ronly; ump->um_devvp->v_specflags &= ~SI_MOUNTEDON; error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p); |