diff --git a/init/do_mounts.c b/init/do_mounts.c index 69bdd953ba87c8547cf58c26724f3dc2d9f095be..178e37340a23b3c6835b0d6b9755f3bc15e956e1 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -527,9 +527,14 @@ void __init init_rootfs(void) #ifdef CONFIG_IMA_DIGEST_LIST if (IS_ENABLED(CONFIG_TMPFS) && (!saved_root_name[0] || initramtmpfs) && +- (!root_fs_names || strstr(root_fs_names, "tmpfs"))) +- is_tmpfs = true; #else - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] && + if (IS_ENABLED(CONFIG_TMPFS)) { + if (!saved_root_name[0] && !root_fs_names) + is_tmpfs = true; + else if (root_fs_names && !!strstr(root_fs_names, "tmpfs")) + is_tmpfs = true; + } #endif - (!root_fs_names || strstr(root_fs_names, "tmpfs"))) - is_tmpfs = true; }