summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-04-10 16:32:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-11 10:28:34 -0700
commit58c501aab3e54b99eac632a2f5ab5f53e0c27948 (patch)
tree2f3d55498729434a66a469da06ba5f01e94739d8 /fs/proc
parent1539d584e488538451526da039fa554fdeea1177 (diff)
downloadlinux-58c501aab3e54b99eac632a2f5ab5f53e0c27948.tar.bz2
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 <adobriyan@gmail.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/cmdline.c3
1 files changed, 2 insertions, 1 deletions
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;
}