aboutsummaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2023-12-13 21:58:40 +0000
committerAndrew Morton <akpm@linux-foundation.org>2023-12-29 11:58:32 -0800
commit69fe7d67cb0c6eeab3d4c9a3bf950f9d12af4719 (patch)
treeda7d7b707c9d15184ebcb0fac73ed1500a3fce4e /mm/swapfile.c
parentc9bdf768dd9319d2d80a334646e2c8116af9e430 (diff)
downloadlinux-69fe7d67cb0c6eeab3d4c9a3bf950f9d12af4719.tar.gz
mm: remove page_swap_info()
It's more efficient to get the swap_info_struct by calling swp_swap_info() directly. Link: https://lkml.kernel.org/r/20231213215842.671461-12-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/swapfile.c')
-rw-r--r--mm/swapfile.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index f3e23a3d26aec..2f877ca445137 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3369,18 +3369,12 @@ struct swap_info_struct *swp_swap_info(swp_entry_t entry)
return swap_type_to_swap_info(swp_type(entry));
}
-struct swap_info_struct *page_swap_info(struct page *page)
-{
- swp_entry_t entry = page_swap_entry(page);
- return swp_swap_info(entry);
-}
-
/*
* out-of-line methods to avoid include hell.
*/
struct address_space *swapcache_mapping(struct folio *folio)
{
- return page_swap_info(&folio->page)->swap_file->f_mapping;
+ return swp_swap_info(folio->swap)->swap_file->f_mapping;
}
EXPORT_SYMBOL_GPL(swapcache_mapping);