diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-10-05 21:01:15 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-11-07 14:38:07 -0800 |
commit | 68158bfa3dbd4af8461ef75a91ffc03be942c8fe (patch) | |
tree | c9d893f1a845509151594a08f051c3cdc7f303ac /mm/ksm.c | |
parent | 713da0b33b3e9d16272b57f4c44dee5c052be9b7 (diff) | |
download | linux-68158bfa3dbd4af8461ef75a91ffc03be942c8fe.tar.gz linux-68158bfa3dbd4af8461ef75a91ffc03be942c8fe.tar.bz2 linux-68158bfa3dbd4af8461ef75a91ffc03be942c8fe.zip |
mm: mass constification of folio/page pointers
Now that page_pgoff() takes const pointers, we can constify the pointers
to a lot of functions.
Link: https://lkml.kernel.org/r/20241005200121.3231142-5-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1051,7 +1051,8 @@ static int unmerge_ksm_pages(struct vm_area_struct *vma, return err; } -static inline struct ksm_stable_node *folio_stable_node(struct folio *folio) +static inline +struct ksm_stable_node *folio_stable_node(const struct folio *folio) { return folio_test_ksm(folio) ? folio_raw_mapping(folio) : NULL; } @@ -3067,7 +3068,7 @@ again: /* * Collect processes when the error hit an ksm page. */ -void collect_procs_ksm(struct folio *folio, struct page *page, +void collect_procs_ksm(const struct folio *folio, const struct page *page, struct list_head *to_kill, int force_early) { struct ksm_stable_node *stable_node; |