Skip to content
Commit 58b7f119 authored by Wei Yang's avatar Wei Yang Committed by Linus Torvalds
Browse files

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: default avatarWei Yang <richard.weiyang@gmail.com>
Signed-off-by: default avatarAndrew 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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 534fe5e3
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