[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250913003842.41944-34-safinaskar@gmail.com>
Date: Sat, 13 Sep 2025 00:38:12 +0000
From: Askar Safin <safinaskar@...il.com>
To: linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Christian Brauner <brauner@...nel.org>,
Al Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>,
Christoph Hellwig <hch@....de>,
Jens Axboe <axboe@...nel.dk>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Aleksa Sarai <cyphar@...har.com>,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Julian Stecklina <julian.stecklina@...erus-technology.de>,
Gao Xiang <hsiangkao@...ux.alibaba.com>,
Art Nikpal <email2tema@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Eric Curtin <ecurtin@...hat.com>,
Alexander Graf <graf@...zon.com>,
Rob Landley <rob@...dley.net>,
Lennart Poettering <mzxreary@...inter.de>,
linux-arch@...r.kernel.org,
linux-alpha@...r.kernel.org,
linux-snps-arc@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-csky@...r.kernel.org,
linux-hexagon@...r.kernel.org,
loongarch@...ts.linux.dev,
linux-m68k@...ts.linux-m68k.org,
linux-mips@...r.kernel.org,
linux-openrisc@...r.kernel.org,
linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org,
sparclinux@...r.kernel.org,
linux-um@...ts.infradead.org,
x86@...nel.org,
Ingo Molnar <mingo@...hat.com>,
linux-block@...r.kernel.org,
initramfs@...r.kernel.org,
linux-api@...r.kernel.org,
linux-doc@...r.kernel.org,
linux-efi@...r.kernel.org,
linux-ext4@...r.kernel.org,
"Theodore Y . Ts'o" <tytso@....edu>,
linux-acpi@...r.kernel.org,
Michal Simek <monstr@...str.eu>,
devicetree@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <kees@...nel.org>,
Thorsten Blum <thorsten.blum@...ux.dev>,
Heiko Carstens <hca@...ux.ibm.com>,
patches@...ts.linux.dev
Subject: [PATCH RESEND 33/62] init: remove init/do_mounts_initrd.c
This is cleanup after initrd removal
Signed-off-by: Askar Safin <safinaskar@...il.com>
---
init/Makefile | 1 -
init/do_mounts_initrd.c | 36 ------------------------------------
init/initramfs.c | 23 +++++++++++++++++++++++
3 files changed, 23 insertions(+), 37 deletions(-)
delete mode 100644 init/do_mounts_initrd.c
diff --git a/init/Makefile b/init/Makefile
index b020154b3d2a..09657c0274eb 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -17,7 +17,6 @@ obj-$(CONFIG_INITRAMFS_TEST) += initramfs_test.o
obj-y += init_task.o
mounts-y := do_mounts.o
-mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o
#
# UTS_VERSION
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
deleted file mode 100644
index 509f912c0fce..000000000000
--- a/init/do_mounts_initrd.c
+++ /dev/null
@@ -1,36 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/unistd.h>
-#include <linux/kernel.h>
-#include <linux/fs.h>
-#include <linux/minix_fs.h>
-#include <linux/romfs_fs.h>
-#include <linux/initrd.h>
-#include <linux/sched.h>
-#include <linux/freezer.h>
-#include <linux/kmod.h>
-#include <uapi/linux/mount.h>
-
-#include "do_mounts.h"
-
-static int __init early_initrdmem(char *p)
-{
- phys_addr_t start;
- unsigned long size;
- char *endp;
-
- start = memparse(p, &endp);
- if (*endp == ',') {
- size = memparse(endp + 1, NULL);
-
- phys_external_initramfs_start = start;
- phys_external_initramfs_size = size;
- }
- return 0;
-}
-early_param("initrdmem", early_initrdmem);
-
-static int __init early_initrd(char *p)
-{
- return early_initrdmem(p);
-}
-early_param("initrd", early_initrd);
diff --git a/init/initramfs.c b/init/initramfs.c
index 90096177a867..8ed352721a79 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -606,6 +606,29 @@ int initramfs_below_start_ok;
phys_addr_t phys_external_initramfs_start __initdata;
unsigned long phys_external_initramfs_size __initdata;
+static int __init early_initrdmem(char *p)
+{
+ phys_addr_t start;
+ unsigned long size;
+ char *endp;
+
+ start = memparse(p, &endp);
+ if (*endp == ',') {
+ size = memparse(endp + 1, NULL);
+
+ phys_external_initramfs_start = start;
+ phys_external_initramfs_size = size;
+ }
+ return 0;
+}
+early_param("initrdmem", early_initrdmem);
+
+static int __init early_initrd(char *p)
+{
+ return early_initrdmem(p);
+}
+early_param("initrd", early_initrd);
+
static BIN_ATTR(initrd, 0440, sysfs_bin_attr_simple_read, NULL, 0);
void __init reserve_initrd_mem(void)
--
2.47.2
Powered by blists - more mailing lists