[PATCH RESEND 53/62] init: rename kexec_free_initrd to kexec_free_initramfs

Askar Safin
2025-09-14T03:59:33Z

This is cleanup after initrd removal

Signed-off-by: Askar Safin <safinaskar@gmail.com>
---
init/initramfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index 40c8e4b05886..d52314b17c25 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -690,7 +690,7 @@ void __weak __init free_initramfs_mem(unsigned long start, unsigned long end)
}

#ifdef CONFIG_CRASH_RESERVE
-static bool __init kexec_free_initrd(void)
+static bool __init kexec_free_initramfs(void)
{
unsigned long crashk_start = (unsigned long)__va(crashk_res.start);
unsigned long crashk_end = (unsigned long)__va(crashk_res.end);
@@ -713,7 +713,7 @@ static bool __init kexec_free_initrd(void)
return true;
}
#else
-static inline bool kexec_free_initrd(void)
+static inline bool kexec_free_initramfs(void)
{
return false;
}
@@ -743,7 +743,7 @@ static void __init do_populate_rootfs(void *unused, async_cookie_t cookie)
* If the initrd region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
- if (!retain_initramfs && virt_external_initramfs_start && !kexec_free_initrd()) {
+ if (!retain_initramfs && virt_external_initramfs_start && !kexec_free_initramfs()) {
free_initramfs_mem(virt_external_initramfs_start, virt_external_initramfs_end);
} else if (retain_initramfs && virt_external_initramfs_start) {
bin_attr_initrd.size = virt_external_initramfs_end - virt_external_initramfs_start;
--
2.47.2