mm/page_alloc.c: extract check_[new|free]_page_bad() common part to page_bad_reason()
authorWei Yang <richard.weiyang@gmail.com>
Wed, 3 Jun 2020 22:58:39 +0000 (15:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jun 2020 03:09:44 +0000 (20:09 -0700)
commit58b7f1194fe1e188a1687e45c3475a98906aae4b
treef1d26608c2d363659fd99244a38f6755b616eec7
parent534fe5e3c44f93ddd9daf7bb59ec2950583d0522
mm/page_alloc.c: extract check_[new|free]_page_bad() common part to page_bad_reason()

We share similar code in check_[new|free]_page_bad() to get the page's bad
reason.

Let's extract it and reduce code duplication.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Link: http://lkml.kernel.org/r/20200411220357.9636-6-richard.weiyang@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c