5e56d4415d97b8907d1b6f9359b25827db20b6bf
[openwrt/openwrt.git] / target / linux / generic / patches-4.1 / 000-keep_initrafs_the_default.patch
1 Upstream changed the default rootfs to tmpfs when none has been passed
2 to the kernel - this doesn't fit our purposes, so change it back.
3
4 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
5
6 --- a/init/do_mounts.c
7 +++ b/init/do_mounts.c
8 @@ -628,6 +628,7 @@ int __init init_rootfs(void)
9 if (err)
10 return err;
11
12 +#if 0
13 if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] &&
14 (!root_fs_names || strstr(root_fs_names, "tmpfs"))) {
15 err = shmem_init();
16 @@ -635,6 +636,9 @@ int __init init_rootfs(void)
17 } else {
18 err = init_ramfs_fs();
19 }
20 +#else
21 + err = init_ramfs_fs();
22 +#endif
23
24 if (err)
25 unregister_filesystem(&rootfs_fs_type);