diff options
author | Kees Cook <kees@kernel.org> | 2024-07-01 21:12:58 +0200 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2024-07-03 12:24:19 +0200 |
commit | 72e0fe2241ce113cbba339ca8c2450b167774530 (patch) | |
tree | 07b844d9297b807a9c3bf567b2ca10ec387a0c60 /mm/slab_common.c | |
parent | slab, rust: extend kmalloc() alignment guarantees to remove Rust padding (diff) | |
download | linux-72e0fe2241ce113cbba339ca8c2450b167774530.tar.xz linux-72e0fe2241ce113cbba339ca8c2450b167774530.zip |
mm/slab: Introduce kmem_buckets typedef
Encapsulate the concept of a single set of kmem_caches that are used
for the kmalloc size buckets. Redefine kmalloc_caches as an array
of these buckets (for the different global cache buckets).
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r-- | mm/slab_common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index 7272ef7bc55f..ff60f91e4edc 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -654,8 +654,7 @@ static struct kmem_cache *__init create_kmalloc_cache(const char *name, return s; } -struct kmem_cache * -kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init = +kmem_buckets kmalloc_caches[NR_KMALLOC_TYPES] __ro_after_init = { /* initialization for https://llvm.org/pr42570 */ }; EXPORT_SYMBOL(kmalloc_caches); |