diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -2077,8 +2077,7 @@ static inline int alloc_kmem_cache_cpus(struct kmem_cache *s, gfp_t flags) | |||
2077 | * when allocating for the kmalloc_node_cache. This is used for bootstrapping | 2077 | * when allocating for the kmalloc_node_cache. This is used for bootstrapping |
2078 | * memory on a fresh node that has no slab structures yet. | 2078 | * memory on a fresh node that has no slab structures yet. |
2079 | */ | 2079 | */ |
2080 | static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags, | 2080 | static void early_kmem_cache_node_alloc(gfp_t gfpflags, int node) |
2081 | int node) | ||
2082 | { | 2081 | { |
2083 | struct page *page; | 2082 | struct page *page; |
2084 | struct kmem_cache_node *n; | 2083 | struct kmem_cache_node *n; |
@@ -2116,7 +2115,6 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags, | |||
2116 | local_irq_save(flags); | 2115 | local_irq_save(flags); |
2117 | add_partial(n, page, 0); | 2116 | add_partial(n, page, 0); |
2118 | local_irq_restore(flags); | 2117 | local_irq_restore(flags); |
2119 | return n; | ||
2120 | } | 2118 | } |
2121 | 2119 | ||
2122 | static void free_kmem_cache_nodes(struct kmem_cache *s) | 2120 | static void free_kmem_cache_nodes(struct kmem_cache *s) |
@@ -2148,8 +2146,7 @@ static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags) | |||
2148 | n = &s->local_node; | 2146 | n = &s->local_node; |
2149 | else { | 2147 | else { |
2150 | if (slab_state == DOWN) { | 2148 | if (slab_state == DOWN) { |
2151 | n = early_kmem_cache_node_alloc(gfpflags, | 2149 | early_kmem_cache_node_alloc(gfpflags, node); |
2152 | node); | ||
2153 | continue; | 2150 | continue; |
2154 | } | 2151 | } |
2155 | n = kmem_cache_alloc_node(kmalloc_caches, | 2152 | n = kmem_cache_alloc_node(kmalloc_caches, |