]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/smaps_rollup: return empty file for kthreads instead of ESRCH
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>
Thu, 14 Apr 2022 06:06:56 +0000 (23:06 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:06:56 +0000 (23:06 -0700)
commitdc142b3007792ef27f12ddddbabfd312a6d58c2b
tree0665fe577dfdcc607df1ca607ba44628fa39cda3
parent91229417033b84dd2ba4b306272d2228946d0fa2
mm/smaps_rollup: return empty file for kthreads instead of ESRCH

This restores the behavior prior to 258f669e7e88 ("mm:
/proc/pid/smaps_rollup: convert to single value seq_file"), making it once
again consistent with maps and smaps, and allowing patterns like awk
'$1=="Anonymous:"{x+=$2}END{print x}' /proc/*/smaps_rollup to work.
Searching all Debian packages for "smaps_rollup" did not find any programs
which would be affected by this change.

Link: https://lkml.kernel.org/r/20220413211357.26938-1-alex_y_xu@yahoo.ca
Fixes: 258f669e7e88 ("mm: /proc/pid/smaps_rollup: convert to single value seq_file")
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/task_mmu.c