mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
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>
This commit is contained in:
parent
7f29070f4c
commit
bd145bdd26
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user