@@ -110,12 +110,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 vma_anon_name() and while using
@@ -1064,7 +1064,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
low_pfn += compound_nr(page) - 1;
/* Successfully isolated */
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
mod_node_page_state(page_pgdat(page),
NR_ISOLATED_ANON + folio_is_file_lru(page_folio(page)),
thp_nr_pages(page));
@@ -280,7 +280,7 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
*/
if (TestClearPageLRU(page)) {
lruvec = folio_lruvec_relock_irq(folio, lruvec);
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
continue;
} else
__munlock_isolation_failed(page);
@@ -85,7 +85,7 @@ static void __page_cache_release(struct page *page)
unsigned long flags;
lruvec = folio_lruvec_lock_irqsave(folio, &flags);
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
__folio_clear_lru_flags(page_folio(page));
unlock_page_lruvec_irqrestore(lruvec, flags);
}
@@ -533,7 +533,7 @@ static void lru_deactivate_file_fn(struct page *page, struct lruvec *lruvec)
if (page_mapped(page))
return;
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
ClearPageActive(page);
ClearPageReferenced(page);
@@ -566,7 +566,7 @@ static void lru_deactivate_fn(struct page *page, struct lruvec *lruvec)
if (PageActive(page) && !PageUnevictable(page)) {
int nr_pages = thp_nr_pages(page);
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
ClearPageActive(page);
ClearPageReferenced(page);
lruvec_add_folio(lruvec, page_folio(page));
@@ -583,7 +583,7 @@ static void lru_lazyfree_fn(struct page *page, struct lruvec *lruvec)
!PageSwapCache(page) && !PageUnevictable(page)) {
int nr_pages = thp_nr_pages(page);
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
ClearPageActive(page);
ClearPageReferenced(page);
/*
@@ -965,7 +965,7 @@ void release_pages(struct page **pages, int nr)
if (prev_lruvec != lruvec)
lock_batch = 0;
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
__folio_clear_lru_flags(page_folio(page));
}
@@ -2247,7 +2247,7 @@ int isolate_lru_page(struct page *page)
get_page(page);
lruvec = folio_lruvec_lock_irq(folio);
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
unlock_page_lruvec_irq(lruvec);
ret = 0;
}
@@ -4873,7 +4873,7 @@ void check_move_unevictable_pages(struct pagevec *pvec)
lruvec = folio_lruvec_relock_irq(folio, lruvec);
if (page_evictable(page) && PageUnevictable(page)) {
- del_page_from_lru_list(page, lruvec);
+ lruvec_del_folio(lruvec, page_folio(page));
ClearPageUnevictable(page);
lruvec_add_folio(lruvec, page_folio(page));
pgrescued += nr_pages;