summaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-05-30 17:48:35 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2019-07-04 22:01:59 -0400
commitfd3e007f6c6a0f677e4ee8aca4b9bab8ad6cab9a (patch)
tree88755e938018b0f3b2d66aa86cdbfafd16e99529 /fs/namespace.c
parent14a253ce4210cd2ef133b392062477e9d656db4a (diff)
downloadlinux-fd3e007f6c6a0f677e4ee8aca4b9bab8ad6cab9a.tar.gz
linux-fd3e007f6c6a0f677e4ee8aca4b9bab8ad6cab9a.tar.bz2
linux-fd3e007f6c6a0f677e4ee8aca4b9bab8ad6cab9a.zip
don't bother with registering rootfs
init_mount_tree() can get to rootfs_fs_type directly and that simplifies a lot of things. We don't need to register it, we don't need to look it up *and* we don't need to bother with preventing subsequent userland mounts. That's the way we should've done that from the very beginning. There is a user-visible change, namely the disappearance of "rootfs" from /proc/filesystems. Note that it's been unmountable all along and it didn't show up in /proc/mounts; however, it *is* a user-visible change and theoretically some script might've been using its presence in /proc/filesystems to tell 2.4.11+ from earlier kernels. *IF* any complaints about behaviour change do show up, we could fake it in /proc/filesystems. I very much doubt we'll have to, though. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 1141641dff96..2db2f4c36c50 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -3686,13 +3686,8 @@ static void __init init_mount_tree(void)
struct mount *m;
struct mnt_namespace *ns;
struct path root;
- struct file_system_type *type;
- type = get_fs_type("rootfs");
- if (!type)
- panic("Can't find rootfs type");
- mnt = vfs_kern_mount(type, 0, "rootfs", NULL);
- put_filesystem(type);
+ mnt = vfs_kern_mount(&rootfs_fs_type, 0, "rootfs", NULL);
if (IS_ERR(mnt))
panic("Can't create rootfs");