From: Askar Safin <safinaskar@gmail.com>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Christian Brauner" <brauner@kernel.org>,
	"Al Viro" <viro@zeniv.linux.org.uk>, "Jan Kara" <jack@suse.cz>,
	"Christoph Hellwig" <hch@lst.de>, "Jens Axboe" <axboe@kernel.dk>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	"Aleksa Sarai" <cyphar@cyphar.com>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Julian Stecklina" <julian.stecklina@cyberus-technology.de>,
	"Gao Xiang" <hsiangkao@linux.alibaba.com>,
	"Art Nikpal" <email2tema@gmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Alexander Graf" <graf@amazon.com>,
	"Rob Landley" <rob@landley.net>,
	"Lennart Poettering" <mzxreary@0pointer.de>,
	linux-arch@vger.kernel.org, linux-block@vger.kernel.org,
	initramfs@vger.kernel.org, linux-api@vger.kernel.org,
	linux-doc@vger.kernel.org, "Michal Simek" <monstr@monstr.eu>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Kees Cook" <kees@kernel.org>,
	"Thorsten Blum" <thorsten.blum@linux.dev>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Arnd Bergmann" <arnd@arndb.de>, "Dave Young" <dyoung@redhat.com>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Borislav Petkov" <bp@alien8.de>,
	"Jessica Clarke" <jrtc27@jrtc27.com>,
	"Nicolas Schichan" <nschichan@freebox.fr>,
	"David Disseldorp" <ddiss@suse.de>,
	patches@lists.linux.dev
Subject: [PATCH v4 3/3] init: remove /proc/sys/kernel/real-root-dev
Date: Wed, 19 Nov 2025 22:24:07 +0000	[thread overview]
Message-ID: <20251119222407.3333257-4-safinaskar@gmail.com> (raw)
In-Reply-To: <20251119222407.3333257-1-safinaskar@gmail.com>

It is not used anymore.

Signed-off-by: Askar Safin <safinaskar@gmail.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 f3ee807b5d8b..218265babaf9 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 fe335dbc95e0..892e69ab41c4 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -8,31 +8,11 @@
 
 unsigned long initrd_start, initrd_end;
 int initrd_below_start_ok;
-static unsigned int real_root_dev;	/* do_proc_dointvec cannot handle kdev_t */
 static int __initdata mount_initrd = 1;
 
 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 no_initrd(char *str)
 {
 	pr_warn("noinitrd option is deprecated and will be removed soon\n");
-- 
2.47.3


  parent reply	other threads:[~2025-11-19 22:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19 22:24 [PATCH v4 0/3] initrd: remove half of classic initrd support Askar Safin
2025-11-19 22:24 ` [PATCH v4 1/3] init: remove deprecated "load_ramdisk" and "prompt_ramdisk" command line parameters Askar Safin
2025-11-20  8:20   ` Arnd Bergmann
2025-11-20 23:44   ` Randy Dunlap
2025-12-15 17:59     ` Askar Safin
2025-11-24 14:27   ` Christoph Hellwig
2025-11-19 22:24 ` [PATCH v4 2/3] initrd: remove deprecated code path (linuxrc) Askar Safin
2025-11-24 14:27   ` Christoph Hellwig
2025-11-19 22:24 ` Askar Safin [this message]
2025-11-24 14:28   ` [PATCH v4 3/3] init: remove /proc/sys/kernel/real-root-dev Christoph Hellwig
2025-11-25  9:41     ` Christian Brauner
2025-11-25  9:41 ` [PATCH v4 0/3] initrd: remove half of classic initrd support 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=20251119222407.3333257-4-safinaskar@gmail.com \
    --to=safinaskar@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=bp@alien8.de \
    --cc=brauner@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=cyphar@cyphar.com \
    --cc=ddiss@suse.de \
    --cc=dyoung@redhat.com \
    --cc=email2tema@gmail.com \
    --cc=graf@amazon.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hca@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=initramfs@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=jrtc27@jrtc27.com \
    --cc=julian.stecklina@cyberus-technology.de \
    --cc=kees@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=monstr@monstr.eu \
    --cc=mzxreary@0pointer.de \
    --cc=nschichan@freebox.fr \
    --cc=patches@lists.linux.dev \
    --cc=rob@landley.net \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=thorsten.blum@linux.dev \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.