[-next,2/2] mm: kill [add|del]_page_to_lru_list()

Message ID 20230612143414.186389-2-wangkefeng.wang@huawei.com
State New
Headers
Series [-next,1/2] mm: compaction: convert to use a folio in isolate_migratepages_block() |

Commit Message

Kefeng Wang June 12, 2023, 2:34 p.m. UTC
  Now no one call [add|del]_page_to_lru_list(), let's drop unused
page interfaces.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 include/linux/mm_inline.h | 12 ------------
 1 file changed, 12 deletions(-)
  

Comments

Yu Zhao June 12, 2023, 7:10 p.m. UTC | #1
On Mon, Jun 12, 2023 at 8:19 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>
> Now no one call [add|del]_page_to_lru_list(), let's drop unused
> page interfaces.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Acked-by: Yu Zhao <yuzhao@google.com>
  

Patch

diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 0e1d239a882c..e9cdeb290841 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -323,12 +323,6 @@  void lruvec_add_folio(struct lruvec *lruvec, struct folio *folio)
 		list_add(&folio->lru, &lruvec->lists[lru]);
 }
 
-static __always_inline void add_page_to_lru_list(struct page *page,
-				struct lruvec *lruvec)
-{
-	lruvec_add_folio(lruvec, page_folio(page));
-}
-
 static __always_inline
 void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio)
 {
@@ -357,12 +351,6 @@  void lruvec_del_folio(struct lruvec *lruvec, struct folio *folio)
 			-folio_nr_pages(folio));
 }
 
-static __always_inline void del_page_from_lru_list(struct page *page,
-				struct lruvec *lruvec)
-{
-	lruvec_del_folio(lruvec, page_folio(page));
-}
-
 #ifdef CONFIG_ANON_VMA_NAME
 /*
  * mmap_lock should be read-locked when calling anon_vma_name(). Caller should