diff options
Diffstat (limited to 'fs/ramfs/inode.c')
-rw-r--r-- | fs/ramfs/inode.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index c24f1e1..39d1465 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c @@ -244,12 +244,6 @@ struct dentry *ramfs_mount(struct file_system_type *fs_type, return mount_nodev(fs_type, flags, data, ramfs_fill_super); } -static struct dentry *rootfs_mount(struct file_system_type *fs_type, - int flags, const char *dev_name, void *data) -{ - return mount_nodev(fs_type, flags|MS_NOUSER, data, ramfs_fill_super); -} - static void ramfs_kill_sb(struct super_block *sb) { kfree(sb->s_fs_info); @@ -262,29 +256,23 @@ static struct file_system_type ramfs_fs_type = { .kill_sb = ramfs_kill_sb, .fs_flags = FS_USERNS_MOUNT, }; -static struct file_system_type rootfs_fs_type = { - .name = "rootfs", - .mount = rootfs_mount, - .kill_sb = kill_litter_super, -}; -static int __init init_ramfs_fs(void) -{ - return register_filesystem(&ramfs_fs_type); -} -module_init(init_ramfs_fs) - -int __init init_rootfs(void) +int __init init_ramfs_fs(void) { + static unsigned long once; int err; + if (test_and_set_bit(0, &once)) + return 0; + err = bdi_init(&ramfs_backing_dev_info); if (err) return err; - err = register_filesystem(&rootfs_fs_type); + err = register_filesystem(&ramfs_fs_type); if (err) bdi_destroy(&ramfs_backing_dev_info); return err; } +module_init(init_ramfs_fs) |