Skip to content

Commit ec2c6ca

Browse files
Matthew Wilcox (Oracle)opsiff
authored andcommitted
mm: remove page_add_new_anon_rmap and lru_cache_add_inactive_or_unevictable
mainline inclusion from mainline-v6.8-rc1 category: performance All callers have now been converted to folio_add_new_anon_rmap() and folio_add_lru_vma() so we can remove the wrapper. Link: https://lkml.kernel.org/r/20231211162214.2146080-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit cafa8e3) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 646b17f commit ec2c6ca

3 files changed

Lines changed: 0 additions & 21 deletions

File tree

include/linux/rmap.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ typedef int __bitwise rmap_t;
192192
void folio_move_anon_rmap(struct folio *, struct vm_area_struct *);
193193
void page_add_anon_rmap(struct page *, struct vm_area_struct *,
194194
unsigned long address, rmap_t flags);
195-
void page_add_new_anon_rmap(struct page *, struct vm_area_struct *,
196-
unsigned long address);
197195
void folio_add_new_anon_rmap(struct folio *, struct vm_area_struct *,
198196
unsigned long address);
199197
void page_add_file_rmap(struct page *, struct vm_area_struct *,

include/linux/swap.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,6 @@ void folio_deactivate(struct folio *folio);
411411
void folio_mark_lazyfree(struct folio *folio);
412412
extern void swap_setup(void);
413413

414-
extern void lru_cache_add_inactive_or_unevictable(struct page *page,
415-
struct vm_area_struct *vma);
416-
417414
/* linux/mm/vmscan.c */
418415
extern unsigned long zone_reclaimable_pages(struct zone *zone);
419416
extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,

mm/folio-compat.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ bool redirty_page_for_writepage(struct writeback_control *wbc,
7777
}
7878
EXPORT_SYMBOL(redirty_page_for_writepage);
7979

80-
void lru_cache_add_inactive_or_unevictable(struct page *page,
81-
struct vm_area_struct *vma)
82-
{
83-
folio_add_lru_vma(page_folio(page), vma);
84-
}
85-
8680
int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
8781
pgoff_t index, gfp_t gfp)
8882
{
@@ -122,13 +116,3 @@ void putback_lru_page(struct page *page)
122116
{
123117
folio_putback_lru(page_folio(page));
124118
}
125-
126-
#ifdef CONFIG_MMU
127-
void page_add_new_anon_rmap(struct page *page, struct vm_area_struct *vma,
128-
unsigned long address)
129-
{
130-
VM_BUG_ON_PAGE(PageTail(page), page);
131-
132-
return folio_add_new_anon_rmap((struct folio *)page, vma, address);
133-
}
134-
#endif

0 commit comments

Comments
 (0)