proc: mark /proc/cmdline as permanent
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 30 Dec 2022 09:36:02 +0000 (12:36 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:50:02 +0000 (22:50 -0800)
/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>
fs/proc/cmdline.c

index 91fe1597af7b44bf07daa1a3fbc18da139d1b1c1..a6f76121955f69b191432d861833fcf04b3991bb 100644 (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;
 }