[PATCH 7/7] mm/migrate: use folio_hstate() in alloc_migration_target()

Sidhartha Kumar posted 7 patches 3 years, 7 months ago
There is a newer version of this series
[PATCH 7/7] mm/migrate: use folio_hstate() in alloc_migration_target()
Posted by Sidhartha Kumar 3 years, 7 months ago
Allows alloc_migration_target to pass in a folio to get hstate information.

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
---
 mm/migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 6a1597c92261..55392a706493 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1589,7 +1589,7 @@ struct page *alloc_migration_target(struct page *page, unsigned long private)
 		nid = folio_nid(folio);
 
 	if (folio_test_hugetlb(folio)) {
-		struct hstate *h = page_hstate(&folio->page);
+		struct hstate *h = folio_hstate(folio);
 
 		gfp_mask = htlb_modify_alloc_mask(h, gfp_mask);
 		return alloc_huge_page_nodemask(h, nid, mtc->nmask, gfp_mask);
-- 
2.31.1