@@ -148,7 +148,11 @@ extern unsigned int reset_devices;
/* used by init/main.c */
void setup_arch(char **);
void prepare_namespace(void);
+#ifndef CONFIG_INITRAMFS_MOUNT
void __init init_rootfs(void);
+#else
+static inline void __init init_rootfs(void) { }
+#endif
bool ramdisk_exec_exist(void);
extern struct file_system_type rootfs_fs_type;
@@ -660,7 +660,10 @@ void __init finish_mount_rootfs(void)
else
revert_mount_rootfs();
}
-#endif
+
+#define rootfs_init_fs_context ramfs_init_fs_context
+
+#else
static bool is_tmpfs;
static int rootfs_init_fs_context(struct fs_context *fc)
@@ -671,13 +674,14 @@ static int rootfs_init_fs_context(struct fs_context *fc)
return ramfs_init_fs_context(fc);
}
+void __init init_rootfs(void)
+{
+ is_tmpfs = is_tmpfs_enabled();
+}
+#endif
+
struct file_system_type rootfs_fs_type = {
.name = "rootfs",
.init_fs_context = rootfs_init_fs_context,
.kill_sb = kill_litter_super,
};
-
-void __init init_rootfs(void)
-{
- is_tmpfs = is_tmpfs_enabled();
-}