public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] proc: mark /proc/cmdline as permanent
@ 2022-12-30  9:36 Alexey Dobriyan
  0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2022-12-30  9:36 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

/proc/cmdline is never removed, mark is as permanent for slightly faster
open and close.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 fs/proc/cmdline.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/proc/cmdline.c
+++ b/fs/proc/cmdline.c
@@ -17,6 +17,7 @@ static int __init proc_cmdline_init(void)
 	struct proc_dir_entry *pde;
 
 	pde = proc_create_single("cmdline", 0, NULL, cmdline_proc_show);
+	pde_make_permanent(pde);
 	pde->size = saved_command_line_len + 1;
 	return 0;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-30  9:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-30  9:36 [PATCH] proc: mark /proc/cmdline as permanent Alexey Dobriyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox