summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-06-17 20:50:18 +0300
committerakpm <akpm@linux-foundation.org>2022-07-04 04:08:48 +0300
commitb98c359f1d921deae04bb5dbbbbbb9d8705b7c4c (patch)
treea415f6a7add769a0eecc798633fd8612214c7c8d /mm
parent5375336c8c42a343c3b440b6f1e21c65e7b174b9 (diff)
downloadlinux-b98c359f1d921deae04bb5dbbbbbb9d8705b7c4c.tar.xz
mm: convert page_swap_flags to folio_swap_flags
The only caller already has a folio, so push the folio->page conversion down a level. Link: https://lkml.kernel.org/r/20220617175020.717127-21-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/swap.h6
-rw-r--r--mm/vmscan.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/mm/swap.h b/mm/swap.h
index 0193797b0c92..85453110be8e 100644
--- a/mm/swap.h
+++ b/mm/swap.h
@@ -61,9 +61,9 @@ struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t flag,
struct page *swapin_readahead(swp_entry_t entry, gfp_t flag,
struct vm_fault *vmf);
-static inline unsigned int page_swap_flags(struct page *page)
+static inline unsigned int folio_swap_flags(struct folio *folio)
{
- return page_swap_info(page)->flags;
+ return page_swap_info(&folio->page)->flags;
}
#else /* CONFIG_SWAP */
struct swap_iocb;
@@ -149,7 +149,7 @@ static inline void clear_shadow_from_swap_cache(int type, unsigned long begin,
{
}
-static inline unsigned int page_swap_flags(struct page *page)
+static inline unsigned int folio_swap_flags(struct folio *folio)
{
return 0;
}
diff --git a/mm/vmscan.c b/mm/vmscan.c
index e660d7205f47..13a28b94cd56 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1572,7 +1572,7 @@ static bool may_enter_fs(struct folio *folio, gfp_t gfp_mask)
* but that will never affect SWP_FS_OPS, so the data_race
* is safe.
*/
- return !data_race(page_swap_flags(&folio->page) & SWP_FS_OPS);
+ return !data_race(folio_swap_flags(folio) & SWP_FS_OPS);
}
/*