summaryrefslogtreecommitdiffstats
path: root/mm/swap_state.c
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2024-07-09 12:55:08 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-07-13 00:52:22 +0200
commit2ef52d5bb78dc2d27d8141578e8095989ad5ca35 (patch)
tree1c484c14b965b6ea9f59da62908f68b8b4a1e928 /mm/swap_state.c
parentmm/migrate: putback split folios when numa hint migration fails (diff)
downloadlinux-2ef52d5bb78dc2d27d8141578e8095989ad5ca35.tar.xz
linux-2ef52d5bb78dc2d27d8141578e8095989ad5ca35.zip
mm: swap_state: use folio_alloc_mpol() in __read_swap_cache_async()
Convert to use folio_alloc_mpol() helper() in __read_swap_cache_async(). Link: https://lkml.kernel.org/r/20240709105508.3933823-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--mm/swap_state.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 994723cef821..a1726e49a5eb 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -470,8 +470,7 @@ struct folio *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask,
* before marking swap_map SWAP_HAS_CACHE, when -EEXIST will
* cause any racers to loop around until we add it to cache.
*/
- folio = (struct folio *)alloc_pages_mpol(gfp_mask, 0,
- mpol, ilx, numa_node_id());
+ folio = folio_alloc_mpol(gfp_mask, 0, mpol, ilx, numa_node_id());
if (!folio)
goto fail_put_swap;