Commit 37540008 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by Linus Torvalds

mm/sl?b.c: remove ctor argument from kmem_cache_flags

This argument hasn't been used since e153362a ("slub: Remove objsize
check in kmem_cache_flags()") so simply remove it.

Link: https://lkml.kernel.org/r/20210126095733.974665-1-nborisov@suse.comSigned-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
Acked-by: default avatarChristoph Lameter <cl@linux.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3544de8e
...@@ -1790,8 +1790,7 @@ static int __ref setup_cpu_cache(struct kmem_cache *cachep, gfp_t gfp) ...@@ -1790,8 +1790,7 @@ static int __ref setup_cpu_cache(struct kmem_cache *cachep, gfp_t gfp)
} }
slab_flags_t kmem_cache_flags(unsigned int object_size, slab_flags_t kmem_cache_flags(unsigned int object_size,
slab_flags_t flags, const char *name, slab_flags_t flags, const char *name)
void (*ctor)(void *))
{ {
return flags; return flags;
} }
......
...@@ -110,8 +110,7 @@ __kmem_cache_alias(const char *name, unsigned int size, unsigned int align, ...@@ -110,8 +110,7 @@ __kmem_cache_alias(const char *name, unsigned int size, unsigned int align,
slab_flags_t flags, void (*ctor)(void *)); slab_flags_t flags, void (*ctor)(void *));
slab_flags_t kmem_cache_flags(unsigned int object_size, slab_flags_t kmem_cache_flags(unsigned int object_size,
slab_flags_t flags, const char *name, slab_flags_t flags, const char *name);
void (*ctor)(void *));
#else #else
static inline struct kmem_cache * static inline struct kmem_cache *
__kmem_cache_alias(const char *name, unsigned int size, unsigned int align, __kmem_cache_alias(const char *name, unsigned int size, unsigned int align,
...@@ -119,8 +118,7 @@ __kmem_cache_alias(const char *name, unsigned int size, unsigned int align, ...@@ -119,8 +118,7 @@ __kmem_cache_alias(const char *name, unsigned int size, unsigned int align,
{ return NULL; } { return NULL; }
static inline slab_flags_t kmem_cache_flags(unsigned int object_size, static inline slab_flags_t kmem_cache_flags(unsigned int object_size,
slab_flags_t flags, const char *name, slab_flags_t flags, const char *name)
void (*ctor)(void *))
{ {
return flags; return flags;
} }
......
...@@ -197,7 +197,7 @@ struct kmem_cache *find_mergeable(unsigned int size, unsigned int align, ...@@ -197,7 +197,7 @@ struct kmem_cache *find_mergeable(unsigned int size, unsigned int align,
size = ALIGN(size, sizeof(void *)); size = ALIGN(size, sizeof(void *));
align = calculate_alignment(flags, align, size); align = calculate_alignment(flags, align, size);
size = ALIGN(size, align); size = ALIGN(size, align);
flags = kmem_cache_flags(size, flags, name, NULL); flags = kmem_cache_flags(size, flags, name);
if (flags & SLAB_NEVER_MERGE) if (flags & SLAB_NEVER_MERGE)
return NULL; return NULL;
......
...@@ -1400,7 +1400,6 @@ __setup("slub_debug", setup_slub_debug); ...@@ -1400,7 +1400,6 @@ __setup("slub_debug", setup_slub_debug);
* @object_size: the size of an object without meta data * @object_size: the size of an object without meta data
* @flags: flags to set * @flags: flags to set
* @name: name of the cache * @name: name of the cache
* @ctor: constructor function
* *
* Debug option(s) are applied to @flags. In addition to the debug * Debug option(s) are applied to @flags. In addition to the debug
* option(s), if a slab name (or multiple) is specified i.e. * option(s), if a slab name (or multiple) is specified i.e.
...@@ -1408,8 +1407,7 @@ __setup("slub_debug", setup_slub_debug); ...@@ -1408,8 +1407,7 @@ __setup("slub_debug", setup_slub_debug);
* then only the select slabs will receive the debug option(s). * then only the select slabs will receive the debug option(s).
*/ */
slab_flags_t kmem_cache_flags(unsigned int object_size, slab_flags_t kmem_cache_flags(unsigned int object_size,
slab_flags_t flags, const char *name, slab_flags_t flags, const char *name)
void (*ctor)(void *))
{ {
char *iter; char *iter;
size_t len; size_t len;
...@@ -1474,8 +1472,7 @@ static inline void add_full(struct kmem_cache *s, struct kmem_cache_node *n, ...@@ -1474,8 +1472,7 @@ static inline void add_full(struct kmem_cache *s, struct kmem_cache_node *n,
static inline void remove_full(struct kmem_cache *s, struct kmem_cache_node *n, static inline void remove_full(struct kmem_cache *s, struct kmem_cache_node *n,
struct page *page) {} struct page *page) {}
slab_flags_t kmem_cache_flags(unsigned int object_size, slab_flags_t kmem_cache_flags(unsigned int object_size,
slab_flags_t flags, const char *name, slab_flags_t flags, const char *name)
void (*ctor)(void *))
{ {
return flags; return flags;
} }
...@@ -3797,7 +3794,7 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) ...@@ -3797,7 +3794,7 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
static int kmem_cache_open(struct kmem_cache *s, slab_flags_t flags) static int kmem_cache_open(struct kmem_cache *s, slab_flags_t flags)
{ {
s->flags = kmem_cache_flags(s->size, flags, s->name, s->ctor); s->flags = kmem_cache_flags(s->size, flags, s->name);
#ifdef CONFIG_SLAB_FREELIST_HARDENED #ifdef CONFIG_SLAB_FREELIST_HARDENED
s->random = get_random_long(); s->random = get_random_long();
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment