Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: remove try_to_free_swap()

All callers have now been converted to folio_free_swap() and we can remove
this wrapper.

Link: https://lkml.kernel.org/r/20220902194653.1739778-49-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
3b344157 9202d527

+1 -14
-6
include/linux/swap.h
··· 510 510 extern int swp_swapcount(swp_entry_t entry); 511 511 extern struct swap_info_struct *page_swap_info(struct page *); 512 512 extern struct swap_info_struct *swp_swap_info(swp_entry_t entry); 513 - extern int try_to_free_swap(struct page *); 514 513 struct backing_dev_info; 515 514 extern int init_swap_address_space(unsigned int type, unsigned long nr_pages); 516 515 extern void exit_swap_address_space(unsigned int type); ··· 590 591 } 591 592 592 593 static inline int swp_swapcount(swp_entry_t entry) 593 - { 594 - return 0; 595 - } 596 - 597 - static inline int try_to_free_swap(struct page *page) 598 594 { 599 595 return 0; 600 596 }
-7
mm/folio-compat.c
··· 146 146 { 147 147 folio_putback_lru(page_folio(page)); 148 148 } 149 - 150 - #ifdef CONFIG_SWAP 151 - int try_to_free_swap(struct page *page) 152 - { 153 - return folio_free_swap(page_folio(page)); 154 - } 155 - #endif
+1 -1
mm/memory.c
··· 3844 3844 3845 3845 if (swapcache) { 3846 3846 /* 3847 - * Make sure try_to_free_swap or swapoff did not release the 3847 + * Make sure folio_free_swap() or swapoff did not release the 3848 3848 * swapcache from under us. The page pin, and pte_same test 3849 3849 * below, are not enough to exclude that. Even if it is still 3850 3850 * swapcache, we need to check that the page's swap has not