Commit 1d9cb785 authored by Kefeng Wang's avatar Kefeng Wang Committed by Andrew Morton

mm: mempolicy: use folio_alloc_mpol() in alloc_migration_target_by_mpol()

Convert to use folio_alloc_mpol() to make vma_alloc_folio_noprof() to use
folio throughout.

Link: https://lkml.kernel.org/r/20240515070709.78529-4-wangkefeng.wang@huawei.comSigned-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 3174d70c
...@@ -1211,7 +1211,6 @@ static struct folio *alloc_migration_target_by_mpol(struct folio *src, ...@@ -1211,7 +1211,6 @@ static struct folio *alloc_migration_target_by_mpol(struct folio *src,
struct migration_mpol *mmpol = (struct migration_mpol *)private; struct migration_mpol *mmpol = (struct migration_mpol *)private;
struct mempolicy *pol = mmpol->pol; struct mempolicy *pol = mmpol->pol;
pgoff_t ilx = mmpol->ilx; pgoff_t ilx = mmpol->ilx;
struct page *page;
unsigned int order; unsigned int order;
int nid = numa_node_id(); int nid = numa_node_id();
gfp_t gfp; gfp_t gfp;
...@@ -1235,8 +1234,7 @@ static struct folio *alloc_migration_target_by_mpol(struct folio *src, ...@@ -1235,8 +1234,7 @@ static struct folio *alloc_migration_target_by_mpol(struct folio *src,
else else
gfp = GFP_HIGHUSER_MOVABLE | __GFP_RETRY_MAYFAIL | __GFP_COMP; gfp = GFP_HIGHUSER_MOVABLE | __GFP_RETRY_MAYFAIL | __GFP_COMP;
page = alloc_pages_mpol(gfp, order, pol, ilx, nid); return folio_alloc_mpol(gfp, order, pol, ilx, nid);
return page_rmappable_folio(page);
} }
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment