From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>, Hugh Dickins <hughd@google.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: [PATCH] mm: swap_state: use folio_alloc_mpol() in __read_swap_cache_async()
Date: Tue, 9 Jul 2024 18:55:08 +0800 [thread overview]
Message-ID: <20240709105508.3933823-1-wangkefeng.wang@huawei.com> (raw)
In-Reply-To: <20240515070709.78529-1-wangkefeng.wang@huawei.com>
Convert to use folio_alloc_mpol() helper() in __read_swap_cache_async().
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
mm/swap_state.c | 3 +--
1 file changed, 1 insertion(+), 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;
--
2.27.0
prev parent reply other threads:[~2024-07-09 10:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 7:07 [PATCH 0/4] mm: convert to folio_alloc_mpol() Kefeng Wang
2024-05-15 7:07 ` [PATCH 1/4] mm: add folio_alloc_mpol() Kefeng Wang
2024-05-15 7:07 ` [PATCH 2/4] mm: mempolicy: use folio_alloc_mpol_noprof() in vma_alloc_folio_noprof() Kefeng Wang
2024-05-15 7:07 ` [PATCH 3/4] mm: mempolicy: use folio_alloc_mpol() in alloc_migration_target_by_mpol() Kefeng Wang
2024-05-15 7:07 ` [PATCH 4/4] mm: shmem: use folio_alloc_mpol() in shmem_alloc_folio() Kefeng Wang
2024-07-09 10:55 ` Kefeng Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240709105508.3933823-1-wangkefeng.wang@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox