[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220304093409.25829-6-linmiaohe@huawei.com>
Date: Fri, 4 Mar 2022 17:33:58 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: <akpm@...ux-foundation.org>
CC: <mike.kravetz@...cle.com>, <shy828301@...il.com>,
<willy@...radead.org>, <ying.huang@...el.com>, <ziy@...dia.com>,
<minchan@...nel.org>, <apopple@...dia.com>,
<ave.hansen@...ux.intel.com>, <o451686892@...il.com>,
<almasrymina@...gle.com>, <jhubbard@...dia.com>,
<rcampbell@...dia.com>, <peterx@...hat.com>,
<naoya.horiguchi@....com>, <mhocko@...e.com>, <riel@...hat.com>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<linmiaohe@...wei.com>
Subject: [PATCH 05/16] mm/migration: fix the confusing PageTransHuge check
prep_transhuge_page should be called when PageTransHuge(page) is true.
The newly allocated new_page is not yet PageTransHuge though it could
pass the check as PageTransHuge only checks PageHead now.
Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
---
mm/migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 26943bd819e8..15cac2dabc93 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1560,7 +1560,7 @@ struct page *alloc_migration_target(struct page *page, unsigned long private)
new_page = __alloc_pages(gfp_mask, order, nid, mtc->nmask);
- if (new_page && PageTransHuge(new_page))
+ if (new_page && PageTransHuge(page))
prep_transhuge_page(new_page);
return new_page;
--
2.23.0
Powered by blists - more mailing lists