Commit 6c04ab0e authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds
Browse files

proc: fix smaps and meminfo alignment

The 4.17-rc /proc/meminfo and /proc/<pid>/smaps look ugly: single-digit
numbers (commonly 0) are misaligned.

Remove seq_put_decimal_ull_width()'s leftover optimization for single
digits: it's wrong now that num_to_str() takes care of the width.

Fixes: d1be35cb

 ("proc: add seq_put_decimal_ull_width to speed up /proc/pid/smaps")
Signed-off-by: default avatarHugh Dickins <>
Cc: Andrei Vagin <>
Cc: Alexey Dobriyan <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 8addc2d0
......@@ -709,11 +709,6 @@ void seq_put_decimal_ull_width(struct seq_file *m, const char *delimiter,
if (m->count + width >= m->size)
goto overflow;
if (num < 10) {
m->buf[m->count++] = num + '0';
len = num_to_str(m->buf + m->count, m->size - m->count, num, width);
if (!len)
goto overflow;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment