summaryrefslogtreecommitdiff
path: root/mm/page_idle.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-29 16:16:54 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 13:01:35 -0400
commit84fbbe21894bb9be8e16df408cbfbb9466fe396d (patch)
treee908796cd1ee4ef4f693807f82ebaaa6a15f9b8f /mm/page_idle.c
parent2f031c6f042cb8a9b221a8b6b80e69de5170f830 (diff)
downloadlwn-84fbbe21894bb9be8e16df408cbfbb9466fe396d.tar.gz
lwn-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);