mm, oom: keep oom_adj under or at upper limit when printing
authorCharles Haithcock <chaithco@redhat.com>
Mon, 2 Nov 2020 01:07:56 +0000 (17:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 2 Nov 2020 20:14:19 +0000 (12:14 -0800)
commit66606567dedf395e0857f531976efad4cbbd39ea
tree3314ef554731de6cb840c181bf96d4158820a4cd
parent6993d0fdbee0eb38bfac350aa016f65ad11ed3b1
mm, oom: keep oom_adj under or at upper limit when printing

For oom_score_adj values in the range [942,999], the current
calculations will print 16 for oom_adj.  This patch simply limits the
output so output is inline with docs.

Signed-off-by: Charles Haithcock <chaithco@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Link: https://lkml.kernel.org/r/20201020165130.33927-1-chaithco@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/base.c