diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-09-02 20:46:08 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-03 14:02:46 -0700 |
commit | a4c366f01f10073e0220656561b875627ff7cd90 (patch) | |
tree | 98d57d0a5695396283ce40faefbaf97626d59115 /mm/swap.h | |
parent | a0d3374b070776e985bbd7b165b178fa688bf37a (diff) |
mm/swap: convert add_to_swap_cache() to take a folio
With all callers using folios, we can convert add_to_swap_cache() to take
a folio and use it throughout.
Link: https://lkml.kernel.org/r/20220902194653.1739778-13-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/swap.h')
-rw-r--r-- | mm/swap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/swap.h b/mm/swap.h index 0ffa5b478051..29e38f3d82d0 100644 --- a/mm/swap.h +++ b/mm/swap.h @@ -32,7 +32,7 @@ extern struct address_space *swapper_spaces[]; void show_swap_cache_info(void); bool add_to_swap(struct folio *folio); void *get_shadow_from_swap_cache(swp_entry_t entry); -int add_to_swap_cache(struct page *page, swp_entry_t entry, +int add_to_swap_cache(struct folio *folio, swp_entry_t entry, gfp_t gfp, void **shadowp); void __delete_from_swap_cache(struct folio *folio, swp_entry_t entry, void *shadow); @@ -122,7 +122,7 @@ static inline void *get_shadow_from_swap_cache(swp_entry_t entry) return NULL; } -static inline int add_to_swap_cache(struct page *page, swp_entry_t entry, +static inline int add_to_swap_cache(struct folio *folio, swp_entry_t entry, gfp_t gfp_mask, void **shadowp) { return -1; |