Messages in this thread Patch in this message | | | From | Miaohe Lin <> | Subject | [PATCH v2 04/11] mm/migration: fix the confusing PageTransHuge check | Date | Fri, 18 Mar 2022 19:17:02 +0800 |
| |
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@huawei.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c index 0ea555e4eaae..b16c561a9a4b 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
| |