diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-08-21 20:34:38 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-09-03 21:15:44 -0700 |
commit | cb29e7941d5d57576392a52c08077ef327ec8e17 (patch) | |
tree | 9764772d0a83b269ce14584f92a9346acc17b907 /mm/huge_memory.c | |
parent | 32f51ead3d7771cdec29f75e08d50a76d2c6253d (diff) | |
download | linux-cb29e7941d5d57576392a52c08077ef327ec8e17.tar.gz linux-cb29e7941d5d57576392a52c08077ef327ec8e17.tar.bz2 linux-cb29e7941d5d57576392a52c08077ef327ec8e17.zip |
mm: remove PageUnevictable
There is only one caller of PageUnevictable() left; convert it to call
folio_test_unevictable() and remove all the page accessors.
Link: https://lkml.kernel.org/r/20240821193445.2294269-6-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index ef6d4f617c4a..8dfb912ebdaa 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2932,25 +2932,25 @@ static void remap_page(struct folio *folio, unsigned long nr) } } -static void lru_add_page_tail(struct page *head, struct page *tail, +static void lru_add_page_tail(struct folio *folio, struct page *tail, struct lruvec *lruvec, struct list_head *list) { - VM_BUG_ON_PAGE(!PageHead(head), head); - VM_BUG_ON_PAGE(PageLRU(tail), head); + VM_BUG_ON_FOLIO(!folio_test_large(folio), folio); + VM_BUG_ON_FOLIO(PageLRU(tail), folio); lockdep_assert_held(&lruvec->lru_lock); if (list) { /* page reclaim is reclaiming a huge page */ - VM_WARN_ON(PageLRU(head)); + VM_WARN_ON(folio_test_lru(folio)); get_page(tail); list_add_tail(&tail->lru, list); } else { /* head is still on lru (and we have it frozen) */ - VM_WARN_ON(!PageLRU(head)); - if (PageUnevictable(tail)) + VM_WARN_ON(!folio_test_lru(folio)); + if (folio_test_unevictable(folio)) tail->mlock_count = 0; else - list_add_tail(&tail->lru, &head->lru); + list_add_tail(&tail->lru, &folio->lru); SetPageLRU(tail); } } @@ -3049,7 +3049,7 @@ static void __split_huge_page_tail(struct folio *folio, int tail, * pages to show after the currently processed elements - e.g. * migrate_pages */ - lru_add_page_tail(head, page_tail, lruvec, list); + lru_add_page_tail(folio, page_tail, lruvec, list); } static void __split_huge_page(struct page *page, struct list_head *list, |