Commit 8598351
committed
mm/slab: move and refactor __kmem_cache_alias()
Move __kmem_cache_alias() to slab_common.c since it's called by
__kmem_cache_create_args() and calls find_mergeable() that both
are in this file. We can remove two slab.h declarations and make
them static. Instead declare sysfs_slab_alias() from slub.c so
that __kmem_cache_alias() can keep calling it.
Add args parameter to __kmem_cache_alias() and find_mergeable() instead
of align and ctor. With that we can also move the checks for usersize
and sheaf_capacity there from __kmem_cache_create_args() and make the
result more symmetric with slab_unmergeable().
No functional changes intended.
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>1 parent b26e52c commit 8598351
3 files changed
Lines changed: 41 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
| 288 | + | |
| 289 | + | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
| |||
400 | 403 | | |
401 | 404 | | |
402 | 405 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | 406 | | |
409 | 407 | | |
410 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
186 | 193 | | |
187 | 194 | | |
188 | 195 | | |
| |||
191 | 198 | | |
192 | 199 | | |
193 | 200 | | |
194 | | - | |
| 201 | + | |
195 | 202 | | |
196 | 203 | | |
197 | 204 | | |
| |||
252 | 259 | | |
253 | 260 | | |
254 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
255 | 287 | | |
256 | 288 | | |
257 | 289 | | |
| |||
323 | 355 | | |
324 | 356 | | |
325 | 357 | | |
326 | | - | |
327 | | - | |
328 | | - | |
| 358 | + | |
329 | 359 | | |
330 | 360 | | |
331 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
354 | 353 | | |
355 | 354 | | |
356 | | - | |
357 | | - | |
358 | 355 | | |
359 | 356 | | |
360 | 357 | | |
| |||
8580 | 8577 | | |
8581 | 8578 | | |
8582 | 8579 | | |
8583 | | - | |
8584 | | - | |
8585 | | - | |
8586 | | - | |
8587 | | - | |
8588 | | - | |
8589 | | - | |
8590 | | - | |
8591 | | - | |
8592 | | - | |
8593 | | - | |
8594 | | - | |
8595 | | - | |
8596 | | - | |
8597 | | - | |
8598 | | - | |
8599 | | - | |
8600 | | - | |
8601 | | - | |
8602 | | - | |
8603 | | - | |
8604 | | - | |
8605 | | - | |
8606 | | - | |
8607 | | - | |
8608 | 8580 | | |
8609 | 8581 | | |
8610 | 8582 | | |
| |||
9837 | 9809 | | |
9838 | 9810 | | |
9839 | 9811 | | |
9840 | | - | |
| 9812 | + | |
9841 | 9813 | | |
9842 | 9814 | | |
9843 | 9815 | | |
| |||
0 commit comments