diff mbox series

[4/5] mm: remove add_page_to_lru_list_tail()

Message ID 20220120131024.502877-5-alexs@kernel.org (mailing list archive)
State New
Headers show
Series remove add/del page to lru functions | expand

Commit Message

alexs@kernel.org Jan. 20, 2022, 1:10 p.m. UTC
From: Alex Shi <alexs@kernel.org>

The function could be fully replaced by lruvec_add_folio_tail, no reason
to keep a duplicate one.

Signed-off-by: Alex Shi <alexs@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Alex Shi <alexs@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
---
 include/linux/mm_inline.h | 6 ------
 mm/swap.c                 | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 7d7abd5ff73f..4df5b39cc97b 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -102,12 +102,6 @@  void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio)
 	list_add_tail(&folio->lru, &lruvec->lists[lru]);
 }
 
-static __always_inline void add_page_to_lru_list_tail(struct page *page,
-				struct lruvec *lruvec)
-{
-	lruvec_add_folio_tail(lruvec, page_folio(page));
-}
-
 static __always_inline
 void lruvec_del_folio(struct lruvec *lruvec, struct folio *folio)
 {
diff --git a/mm/swap.c b/mm/swap.c
index fb101a06dce4..23c0afb76be6 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -550,7 +550,7 @@  static void lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec)
 		 * The page's writeback ends up during pagevec
 		 * We move that page into tail of inactive.
 		 */
-		add_page_to_lru_list_tail(page, lruvec);
+		lruvec_add_folio_tail(lruvec, page_folio(page));
 		__count_vm_events(PGROTATED, nr_pages);
 	}