From: Ye Liu Date: Thu, 20 Mar 2025 06:33:46 +0000 (+0800) Subject: mm/page_alloc: replace flag check with PageHWPoison() in check_new_page_bad() X-Git-Tag: v6.15-rc1~38^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd145bdd26c6845b5403d47b3b094bb5d020c6ef;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Sidhartha Kumar Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 37d111184eeeb..e892a55b471cd 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1593,7 +1593,7 @@ static __always_inline void page_del_and_expand(struct zone *zone, static void check_new_page_bad(struct page *page) { - if (unlikely(page->flags & __PG_HWPOISON)) { + if (unlikely(PageHWPoison(page))) { /* Don't complain about hwpoisoned pages */ if (PageBuddy(page)) __ClearPageBuddy(page);