summaryrefslogtreecommitdiffstats
path: root/mm/page_idle.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-29 22:06:53 +0100
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 18:01:35 +0100
commit2f031c6f042cb8a9b221a8b6b80e69de5170f830 (patch)
treeb07b43d1a1f74fe3552e0cd08bafdf11bde6b1a9 /mm/page_idle.c
parentmm: Turn page_anon_vma() into folio_anon_vma() (diff)
downloadlinux-2f031c6f042cb8a9b221a8b6b80e69de5170f830.tar.xz
linux-2f031c6f042cb8a9b221a8b6b80e69de5170f830.zip
mm/rmap: Convert rmap_walk() to take a folio
This ripples all the way through to every calling and called function from rmap. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/page_idle.c')
-rw-r--r--mm/page_idle.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/page_idle.c b/mm/page_idle.c
index 5c73a9b578da..e34ba04e22e2 100644
--- a/mm/page_idle.c
+++ b/mm/page_idle.c
@@ -46,11 +46,10 @@ static struct page *page_idle_get_page(unsigned long pfn)
return page;
}
-static bool page_idle_clear_pte_refs_one(struct page *page,
+static bool page_idle_clear_pte_refs_one(struct folio *folio,
struct vm_area_struct *vma,
unsigned long addr, void *arg)
{
- struct folio *folio = page_folio(page);
DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, addr, 0);
bool referenced = false;
@@ -93,7 +92,7 @@ static void page_idle_clear_pte_refs(struct page *page)
*/
static const struct rmap_walk_control rwc = {
.rmap_one = page_idle_clear_pte_refs_one,
- .anon_lock = page_lock_anon_vma_read,
+ .anon_lock = folio_lock_anon_vma_read,
};
bool need_lock;
@@ -104,7 +103,7 @@ static void page_idle_clear_pte_refs(struct page *page)
if (need_lock && !folio_trylock(folio))
return;
- rmap_walk(&folio->page, (struct rmap_walk_control *)&rwc);
+ rmap_walk(folio, (struct rmap_walk_control *)&rwc);
if (need_lock)
folio_unlock(folio);