aboutsummaryrefslogtreecommitdiff
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle)2022-01-29 16:16:54 -0500
committerMatthew Wilcox (Oracle)2022-03-21 13:01:35 -0400
commit84fbbe21894bb9be8e16df408cbfbb9466fe396d (patch)
treee908796cd1ee4ef4f693807f82ebaaa6a15f9b8f /mm/ksm.c
parent2f031c6f042cb8a9b221a8b6b80e69de5170f830 (diff)
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/ksm.c')
-rw-r--r--mm/ksm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/ksm.c b/mm/ksm.c
index dd737f925c04..eed2ff25a2fb 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -2588,7 +2588,7 @@ struct page *ksm_might_need_to_copy(struct page *page,
return new_page;
}
-void rmap_walk_ksm(struct folio *folio, struct rmap_walk_control *rwc)
+void rmap_walk_ksm(struct folio *folio, const struct rmap_walk_control *rwc)
{
struct stable_node *stable_node;
struct rmap_item *rmap_item;