From: David Disseldorp <ddiss@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
David Disseldorp <ddiss@suse.de>
Subject: [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking
Date: Thu, 11 Jan 2024 17:22:40 +1100 [thread overview]
Message-ID: <20240111062240.9362-1-ddiss@suse.de> (raw)
If initrd_start cpio extraction fails, CONFIG_BLK_DEV_RAM triggers
fallback to initrd.image handling via populate_initrd_image().
The populate_initrd_image() call follows successful extraction of any
built-in cpio archive at __initramfs_start, but currently performs
built-in archive extraction a second time.
Prior to commit b2a74d5f9d446 ("initramfs: remove clean_rootfs"),
the second built-in initramfs unpack call was used to repopulate entries
removed by clean_rootfs(), but it's no longer necessary now the contents
of the previous extraction are retained.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
init/initramfs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/init/initramfs.c b/init/initramfs.c
index 8d0fd946cdd2b..2edd3007a6857 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -669,8 +669,6 @@ static void __init populate_initrd_image(char *err)
struct file *file;
loff_t pos = 0;
- unpack_to_rootfs(__initramfs_start, __initramfs_size);
-
printk(KERN_INFO "rootfs image is not initramfs (%s); looks like an initrd\n",
err);
file = filp_open("/initrd.image", O_WRONLY | O_CREAT, 0700);
--
2.35.3
next reply other threads:[~2024-01-11 6:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 6:22 David Disseldorp [this message]
2024-01-11 6:45 ` [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking Christoph Hellwig
2024-01-11 8:15 ` David Disseldorp
2024-01-11 9:31 ` Christian Brauner
2024-01-11 9:30 ` Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240111062240.9362-1-ddiss@suse.de \
--to=ddiss@suse.de \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox