[PATCH] proc: faster /proc/cmdline

From: Alexey Dobriyan
Date: Fri Mar 09 2018 - 17:29:59 EST


Use seq_puts() and skip format string processing.

Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---

fs/proc/cmdline.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/proc/cmdline.c
+++ b/fs/proc/cmdline.c
@@ -6,7 +6,8 @@

static int cmdline_proc_show(struct seq_file *m, void *v)
{
- seq_printf(m, "%s\n", saved_command_line);
+ seq_puts(m, saved_command_line);
+ seq_putc(m, '\n');
return 0;
}