| @@ -2173,7 +2173,7 @@ void __put_anon_vma(struct anon_vma *anon_vma) · 2172 unmodified lines |
| 2173 | } | 2173 | } |
| 2174 | | 2174 | |
| 2175 | static struct anon_vma *rmap_walk_anon_lock(struct folio *folio, | 2175 | static struct anon_vma *rmap_walk_anon_lock(struct folio *folio, |
| 2176 | struct rmap_walk_control *rwc) | 2176 | const struct rmap_walk_control *rwc) |
| 2177 | { | 2177 | { |
| 2178 | struct anon_vma *anon_vma; | 2178 | struct anon_vma *anon_vma; |
| 2179 | | 2179 | |
| @@ -2203,8 +2203,8 @@ static struct anon_vma *rmap_walk_anon_lock(struct folio *folio, · 23 unmodified lines |
| 2203 | * Find all the mappings of a page using the mapping pointer and the vma chains | 2203 | * Find all the mappings of a page using the mapping pointer and the vma chains |
| 2204 | * contained in the anon_vma struct it points to. | 2204 | * contained in the anon_vma struct it points to. |
| 2205 | */ | 2205 | */ |
| 2206 | static void rmap_walk_anon(struct folio *folio, struct rmap_walk_control *rwc, | 2206 | static void rmap_walk_anon(struct folio *folio, |
| 2207 | bool locked) | 2207 | const struct rmap_walk_control *rwc, bool locked) |
| 2208 | { | 2208 | { |
| 2209 | struct anon_vma *anon_vma; | 2209 | struct anon_vma *anon_vma; |
| 2210 | pgoff_t pgoff_start, pgoff_end; | 2210 | pgoff_t pgoff_start, pgoff_end; |
| @@ -2251,8 +2251,8 @@ static void rmap_walk_anon(struct folio *folio, struct rmap_walk_control *rwc, · 40 unmodified lines |
| 2251 | * Find all the mappings of a page using the mapping pointer and the vma chains | 2251 | * Find all the mappings of a page using the mapping pointer and the vma chains |
| 2252 | * contained in the address_space struct it points to. | 2252 | * contained in the address_space struct it points to. |
| 2253 | */ | 2253 | */ |
| 2254 | static void rmap_walk_file(struct folio *folio, struct rmap_walk_control *rwc, | 2254 | static void rmap_walk_file(struct folio *folio, |
| 2255 | bool locked) | 2255 | const struct rmap_walk_control *rwc, bool locked) |
| 2256 | { | 2256 | { |
| 2257 | struct address_space *mapping = folio_mapping(folio); | 2257 | struct address_space *mapping = folio_mapping(folio); |
| 2258 | pgoff_t pgoff_start, pgoff_end; | 2258 | pgoff_t pgoff_start, pgoff_end; |
| @@ -2294,7 +2294,7 @@ done: · 35 unmodified lines |
| 2294 | i_mmap_unlock_read(mapping); | 2294 | i_mmap_unlock_read(mapping); |
| 2295 | } | 2295 | } |
| 2296 | | 2296 | |
| 2297 | void rmap_walk(struct folio *folio, struct rmap_walk_control *rwc) | 2297 | void rmap_walk(struct folio *folio, const struct rmap_walk_control *rwc) |
| 2298 | { | 2298 | { |
| 2299 | if (unlikely(folio_test_ksm(folio))) | 2299 | if (unlikely(folio_test_ksm(folio))) |
| 2300 | rmap_walk_ksm(folio, rwc); | 2300 | rmap_walk_ksm(folio, rwc); |
| @@ -2305,7 +2305,7 @@ void rmap_walk(struct folio *folio, struct rmap_walk_control *rwc) · 4 unmodified lines |
| 2305 | } | 2305 | } |
| 2306 | | 2306 | |
| 2307 | /* Like rmap_walk, but caller holds relevant rmap lock */ | 2307 | /* Like rmap_walk, but caller holds relevant rmap lock */ |
| 2308 | void rmap_walk_locked(struct folio *folio, struct rmap_walk_control *rwc) | 2308 | void rmap_walk_locked(struct folio *folio, const struct rmap_walk_control *rwc) |
| 2309 | { | 2309 | { |
| 2310 | /* no ksm support for now */ | 2310 | /* no ksm support for now */ |
| 2311 | VM_BUG_ON_FOLIO(folio_test_ksm(folio), folio); | 2311 | VM_BUG_ON_FOLIO(folio_test_ksm(folio), folio); |