diff options
author | Vishal Moola (Oracle) <vishal.moola@gmail.com> | 2023-01-13 16:15:56 -0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-02 22:33:05 -0800 |
commit | 9bdfeea46f4926181b9476037c6af28d6d19cc28 (patch) | |
tree | a2131f7f3ccdf673b9c87c9bfa5f4e733b939621 /mm/khugepaged.c | |
parent | 92644f583d5124b60bc20a3dd21b0bc9142f020c (diff) |
mm/khugepaged: convert release_pte_pages() to use folios
Converts release_pte_pages() to use folios instead of pages.
Link: https://lkml.kernel.org/r/20230114001556.43795-2-vishal.moola@gmail.com
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/khugepaged.c')
-rw-r--r-- | mm/khugepaged.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index d7b993e53711..b39ab219d5b7 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -507,20 +507,20 @@ static void release_pte_page(struct page *page) static void release_pte_pages(pte_t *pte, pte_t *_pte, struct list_head *compound_pagelist) { - struct page *page, *tmp; + struct folio *folio, *tmp; while (--_pte >= pte) { pte_t pteval = *_pte; - page = pte_page(pteval); + folio = pfn_folio(pte_pfn(pteval)); if (!pte_none(pteval) && !is_zero_pfn(pte_pfn(pteval)) && - !PageCompound(page)) - release_pte_page(page); + !folio_test_large(folio)) + release_pte_folio(folio); } - list_for_each_entry_safe(page, tmp, compound_pagelist, lru) { - list_del(&page->lru); - release_pte_page(page); + list_for_each_entry_safe(folio, tmp, compound_pagelist, lru) { + list_del(&folio->lru); + release_pte_folio(folio); } } |