diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2018-04-11 01:32:01 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-11 19:28:34 +0200 |
commit | 58c501aab3e54b99eac632a2f5ab5f53e0c27948 (patch) | |
tree | 2f3d55498729434a66a469da06ba5f01e94739d8 /fs/proc/cmdline.c | |
parent | proc: register filesystem last (diff) | |
download | linux-58c501aab3e54b99eac632a2f5ab5f53e0c27948.tar.xz linux-58c501aab3e54b99eac632a2f5ab5f53e0c27948.zip |
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/cmdline.c')
-rw-r--r-- | fs/proc/cmdline.c | 3 |
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; } |