diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2018-04-05 16:20:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-05 21:36:23 -0700 |
commit | 361d575e5c7a39c73a8a9bdd504c1d1274f280aa (patch) | |
tree | dbb71fd1a03cc0c570f85473dcac55df3dd394c1 /mm/slab_common.c | |
parent | 55de8b9c60f2f6da9bf5c9144020882d07e62296 (diff) | |
download | linux-361d575e5c7a39c73a8a9bdd504c1d1274f280aa.tar.bz2 |
slab: make create_boot_cache() work with 32-bit sizes
struct kmem_cache::size has always been "int", all those
"size_t size" are fake.
Link: http://lkml.kernel.org/r/20180305200730.15812-5-adobriyan@gmail.com
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r-- | mm/slab_common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index f9afca292858..2a7f09ce7c84 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -917,8 +917,9 @@ bool slab_is_available(void) #ifndef CONFIG_SLOB /* Create a cache during boot when no slab services are available yet */ -void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t size, - slab_flags_t flags, size_t useroffset, size_t usersize) +void __init create_boot_cache(struct kmem_cache *s, const char *name, + unsigned int size, slab_flags_t flags, + unsigned int useroffset, unsigned int usersize) { int err; @@ -933,7 +934,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz err = __kmem_cache_create(s, flags); if (err) - panic("Creation of kmalloc slab %s size=%zu failed. Reason %d\n", + panic("Creation of kmalloc slab %s size=%u failed. Reason %d\n", name, size, err); s->refcount = -1; /* Exempt from merging for now */ |