diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-13 05:23:02 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-05-13 16:20:15 +0200 |
commit | 09c02e56327bdaf9cdbb2742a35fb8c6a6f9a6c7 (patch) | |
tree | fd773c9b742b471f189984aca2da30a7d038afba /mm/swap.h | |
parent | swap: turn get_swap_page() into folio_alloc_swap() (diff) | |
download | linux-09c02e56327bdaf9cdbb2742a35fb8c6a6f9a6c7.tar.xz linux-09c02e56327bdaf9cdbb2742a35fb8c6a6f9a6c7.zip |
swap: convert add_to_swap() to take a folio
The only caller already has a folio available, so this saves a conversion.
Also convert the return type to boolean.
Link: https://lkml.kernel.org/r/20220504182857.4013401-9-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/swap.h')
-rw-r--r-- | mm/swap.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/swap.h b/mm/swap.h index a6da8f612904..0193797b0c92 100644 --- a/mm/swap.h +++ b/mm/swap.h @@ -32,7 +32,7 @@ extern struct address_space *swapper_spaces[]; >> SWAP_ADDRESS_SPACE_SHIFT]) void show_swap_cache_info(void); -int add_to_swap(struct page *page); +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, gfp_t gfp, void **shadowp); @@ -119,9 +119,9 @@ struct page *find_get_incore_page(struct address_space *mapping, pgoff_t index) return find_get_page(mapping, index); } -static inline int add_to_swap(struct page *page) +static inline bool add_to_swap(struct folio *folio) { - return 0; + return false; } static inline void *get_shadow_from_swap_cache(swp_entry_t entry) |