Commit d5d2c02a authored by Mike Rapoport (IBM)'s avatar Mike Rapoport (IBM) Committed by Andrew Morton

mm: move kmem_cache_init() declaration to mm/slab.h

kmem_cache_init() is called only from mm_core_init(), there is no need to
declare it in include/linux/slab.h

Move kmem_cache_init() declaration to mm/slab.h

Link: https://lkml.kernel.org/r/20230321170513.2401534-13-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
Cc: Doug Berger <opendmb@gmail.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent eb8589b4
...@@ -167,7 +167,6 @@ struct mem_cgroup; ...@@ -167,7 +167,6 @@ struct mem_cgroup;
/* /*
* struct kmem_cache related prototypes * struct kmem_cache related prototypes
*/ */
void __init kmem_cache_init(void);
bool slab_is_available(void); bool slab_is_available(void);
struct kmem_cache *kmem_cache_create(const char *name, unsigned int size, struct kmem_cache *kmem_cache_create(const char *name, unsigned int size,
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/swap.h> #include <linux/swap.h>
#include <linux/cma.h> #include <linux/cma.h>
#include "internal.h" #include "internal.h"
#include "slab.h"
#include "shuffle.h" #include "shuffle.h"
#include <asm/setup.h> #include <asm/setup.h>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
/* /*
* Internal slab definitions * Internal slab definitions
*/ */
void __init kmem_cache_init(void);
/* Reuses the bits in struct page */ /* Reuses the bits in struct page */
struct slab { struct slab {
......
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