[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250913003842.41944-13-safinaskar@gmail.com>
Date: Sat, 13 Sep 2025 00:37:51 +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 12/62] init: remove /proc/sys/kernel/real-root-dev
It was used for initrd support, which was removed in previous
commits
Signed-off-by: Askar Safin <safinaskar@...il.com>
---
Documentation/admin-guide/sysctl/kernel.rst | 6 ------
include/uapi/linux/sysctl.h | 1 -
init/do_mounts_initrd.c | 20 --------------------
3 files changed, 27 deletions(-)
diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index 8b49eab937d0..cc958c228bc2 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -1215,12 +1215,6 @@ that support this feature.
== ===========================================================================
-real-root-dev
-=============
-
-See Documentation/admin-guide/initrd.rst.
-
-
reboot-cmd (SPARC only)
=======================
diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h
index 63d1464cb71c..1c7fe0f4dca4 100644
--- a/include/uapi/linux/sysctl.h
+++ b/include/uapi/linux/sysctl.h
@@ -92,7 +92,6 @@ enum
KERN_DOMAINNAME=8, /* string: domainname */
KERN_PANIC=15, /* int: panic timeout */
- KERN_REALROOTDEV=16, /* real root device to mount after initrd */
KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index bec1c5d684a3..d5264e9a52e0 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -14,30 +14,10 @@
unsigned long initrd_start, initrd_end;
int initrd_below_start_ok;
-static unsigned int real_root_dev; /* do_proc_dointvec cannot handle kdev_t */
phys_addr_t phys_initrd_start __initdata;
unsigned long phys_initrd_size __initdata;
-#ifdef CONFIG_SYSCTL
-static const struct ctl_table kern_do_mounts_initrd_table[] = {
- {
- .procname = "real-root-dev",
- .data = &real_root_dev,
- .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
-};
-
-static __init int kernel_do_mounts_initrd_sysctls_init(void)
-{
- register_sysctl_init("kernel", kern_do_mounts_initrd_table);
- return 0;
-}
-late_initcall(kernel_do_mounts_initrd_sysctls_init);
-#endif /* CONFIG_SYSCTL */
-
static int __init early_initrdmem(char *p)
{
phys_addr_t start;
--
2.47.2
Powered by blists - more mailing lists