diff options
-rw-r--r-- | sys/fs/devfs/devfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vfsops.c | 2 | ||||
-rw-r--r-- | sys/fs/hpfs/hpfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 2 |
4 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index a904dcd..a0b3403 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -68,7 +68,7 @@ devfs_mount(struct mount *mp, struct thread *td) error = 0; - if (mp->mnt_flag & (MNT_UPDATE | MNT_NODEV)) + if (mp->mnt_flag & (MNT_UPDATE | MNT_NODEV | MNT_ROOTFS)) return (EOPNOTSUPP); MALLOC(fmp, struct devfs_mount *, sizeof(struct devfs_mount), diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 01e8956..0b7e403 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -71,7 +71,7 @@ fdesc_mount(struct mount *mp, struct thread *td) /* * Update is a no-op */ - if (mp->mnt_flag & MNT_UPDATE) + if (mp->mnt_flag & (MNT_UPDATE | MNT_ROOTFS)) return (EOPNOTSUPP); error = fdesc_allocvp(Froot, FD_ROOT, mp, &rvp, td); diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index 4b72606..4acf562 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -225,6 +225,8 @@ hpfs_mountfs(devvp, mp, argsp, td) struct g_consumer *cp; struct bufobj *bo; + if (mp->mnt_flag & MNT_ROOTFS) + return (EOPNOTSUPP); dprintf(("hpfs_mountfs():\n")); ronly = (mp->mnt_flag & MNT_RDONLY) != 0; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index fdad05a..a54b36f 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -364,6 +364,8 @@ mountmsdosfs(devvp, mp, td, argp) struct g_consumer *cp; struct bufobj *bo; + if (mp->mnt_flag & MNT_ROOTFS) + return (EOPNOTSUPP); ronly = (mp->mnt_flag & MNT_RDONLY) != 0; /* XXX: use VOP_ACCESS to check FS perms */ DROP_GIANT(); |