proc: mark /proc/cmdline as permanent

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

Link: https://lkml.kernel.org/r/Y66xAveh2yUsP7m9@p183
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Alexey Dobriyan 2022-12-30 12:36:02 +03:00 committed by Andrew Morton
parent a3ea42ff8f
commit a61c01e8f4

View File

@ -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;
}