From: Alexey Dobriyan Date: Tue, 10 Apr 2018 23:32:01 +0000 (-0700) Subject: proc: faster /proc/cmdline X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=58c501aab3e54b99eac632a2f5ab5f53e0c27948;p=openwrt%2Fstaging%2Fblogic.git proc: faster /proc/cmdline Use seq_puts() and skip format string processing. Link: http://lkml.kernel.org/r/20180309222948.GB3843@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c index 403cbb12a6e9..8233e7af9389 100644 --- 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; }