* [PATCH v2] Fix alignment of value in /proc/$pid/smaps
[not found] <20191230045303.226623-1-samuel.williams () oriontransfer ! co ! nz>
@ 2019-12-30 8:41 ` Samuel Williams
2020-04-02 12:48 ` Kirill A. Shutemov
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Williams @ 2019-12-30 8:41 UTC (permalink / raw)
To: adobriyan, linux-fsdevel; +Cc: Samuel Williams
The /proc/$pid/smaps output has an alignment issue for the field
FilePmdMapped and THPeligible.
Increases the alignment of FilePmdMapped by 1 space, and converts the
alignment of THPeligible to use spaces instead of tabs, to be consistent
with the other fields.
Signed-off-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
---
Changes in v2:
- Add missing "Signed-off-by". My sincere apologies for missing this.
fs/proc/task_mmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 9442631fd4af..f7ca20af2371 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -810,7 +810,7 @@ static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss,
SEQ_PUT_DEC(" kB\nLazyFree: ", mss->lazyfree);
SEQ_PUT_DEC(" kB\nAnonHugePages: ", mss->anonymous_thp);
SEQ_PUT_DEC(" kB\nShmemPmdMapped: ", mss->shmem_thp);
- SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp);
+ SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp);
SEQ_PUT_DEC(" kB\nShared_Hugetlb: ", mss->shared_hugetlb);
seq_put_decimal_ull_width(m, " kB\nPrivate_Hugetlb: ",
mss->private_hugetlb >> 10, 7);
@@ -840,7 +840,7 @@ static int show_smap(struct seq_file *m, void *v)
__show_smap(m, &mss, false);
- seq_printf(m, "THPeligible: %d\n",
+ seq_printf(m, "THPeligible: %d\n",
transparent_hugepage_enabled(vma));
if (arch_pkeys_enabled())
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread