summaryrefslogtreecommitdiffstats
path: root/mm/page_idle.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-29 22:16:54 +0100
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 18:01:35 +0100
commit84fbbe21894bb9be8e16df408cbfbb9466fe396d (patch)
treee908796cd1ee4ef4f693807f82ebaaa6a15f9b8f /mm/page_idle.c
parentmm/rmap: Convert rmap_walk() to take a folio (diff)
downloadlinux-84fbbe21894bb9be8e16df408cbfbb9466fe396d.tar.xz
linux-84fbbe21894bb9be8e16df408cbfbb9466fe396d.zip
mm/rmap: Constify the rmap_walk_control argument
The rmap walking functions do not modify the rmap_walk_control, and page_idle_clear_pte_refs() takes advantage of that to move construction of the rmap_walk_control to compile time. This lets us remove an unclean cast. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/page_idle.c')
-rw-r--r--mm/page_idle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_idle.c b/mm/page_idle.c
index e34ba04e22e2..fc0435abf909 100644
--- a/mm/page_idle.c
+++ b/mm/page_idle.c
@@ -103,7 +103,7 @@ static void page_idle_clear_pte_refs(struct page *page)
if (need_lock && !folio_trylock(folio))
return;
- rmap_walk(folio, (struct rmap_walk_control *)&rwc);
+ rmap_walk(folio, &rwc);
if (need_lock)
folio_unlock(folio);