aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-05-30 15:59:57 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2019-07-04 22:01:59 -0400
commit14a253ce4210cd2ef133b392062477e9d656db4a (patch)
tree36cfc4d45ff27e77ab4100923430596c5e352d8c
parentvfs: Convert smackfs to use the new mount API (diff)
downloadwireguard-linux-14a253ce4210cd2ef133b392062477e9d656db4a.tar.xz
wireguard-linux-14a253ce4210cd2ef133b392062477e9d656db4a.zip
init_rootfs(): don't bother with init_ramfs_fs()
the only thing done by the latter is making ramfs visible to mount(2); we don't need it there - rootfs is separate and, in fact, made visible to mount(2) in the same init_rootfs(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/ramfs/inode.c6
-rw-r--r--include/linux/ramfs.h1
-rw-r--r--init/do_mounts.c2
3 files changed, 1 insertions, 8 deletions
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index 11201b2d06b9..733c6b4193dc 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -266,12 +266,8 @@ static struct file_system_type ramfs_fs_type = {
.fs_flags = FS_USERNS_MOUNT,
};
-int __init init_ramfs_fs(void)
+static int __init init_ramfs_fs(void)
{
- static unsigned long once;
-
- if (test_and_set_bit(0, &once))
- return 0;
return register_filesystem(&ramfs_fs_type);
}
fs_initcall(init_ramfs_fs);
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h
index 5ef7d54caac2..ee582bdb7fda 100644
--- a/include/linux/ramfs.h
+++ b/include/linux/ramfs.h
@@ -19,7 +19,6 @@ extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize);
extern const struct file_operations ramfs_file_operations;
extern const struct vm_operations_struct generic_file_vm_ops;
-extern int __init init_ramfs_fs(void);
int ramfs_fill_super(struct super_block *sb, void *data, int silent);
diff --git a/init/do_mounts.c b/init/do_mounts.c
index f8c230c77035..c170d8b309b1 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -658,8 +658,6 @@ int __init init_rootfs(void)
(!root_fs_names || strstr(root_fs_names, "tmpfs"))) {
err = shmem_init();
is_tmpfs = true;
- } else {
- err = init_ramfs_fs();
}
if (err)