mm/page_alloc: replace flag check with PageHWPoison() in check_new_page_bad()
authorYe Liu <liuye@kylinos.cn>
Thu, 20 Mar 2025 06:33:46 +0000 (14:33 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 1 Apr 2025 22:17:10 +0000 (15:17 -0700)
commitbd145bdd26c6845b5403d47b3b094bb5d020c6ef
tree2a33b4578834d88312188fdb0a0c3c21e9df8ac9
parent7f29070f4c8599dfe7582415ef162474588fd462
mm/page_alloc: replace flag check with PageHWPoison() in check_new_page_bad()

This patch replaces the direct check for the __PG_HWPOISON flag with the
PageHWPoison() macro, improving code readability and maintaining
consistency with other parts of the memory management code.

Link: https://lkml.kernel.org/r/20250320063346.489030-1-ye.liu@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c