proc: mark /proc/cmdline as permanent

Message ID Y66xAveh2yUsP7m9@p183
State New
Headers
Series proc: mark /proc/cmdline as permanent |

Commit Message

Alexey Dobriyan Dec. 30, 2022, 9:36 a.m. UTC
  /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(+)
  

Patch

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