slub: make early_kmem_cache_node_alloc void
The return value for early_kmem_cache_node_alloc() is unused, so it is better defined as void. Acked-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
This commit is contained in:
Родитель
249b9f331e
Коммит
0094de92a4
|
@ -2077,8 +2077,7 @@ static inline int alloc_kmem_cache_cpus(struct kmem_cache *s, gfp_t flags)
|
||||||
* when allocating for the kmalloc_node_cache. This is used for bootstrapping
|
* when allocating for the kmalloc_node_cache. This is used for bootstrapping
|
||||||
* memory on a fresh node that has no slab structures yet.
|
* memory on a fresh node that has no slab structures yet.
|
||||||
*/
|
*/
|
||||||
static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
|
static void early_kmem_cache_node_alloc(gfp_t gfpflags, int node)
|
||||||
int node)
|
|
||||||
{
|
{
|
||||||
struct page *page;
|
struct page *page;
|
||||||
struct kmem_cache_node *n;
|
struct kmem_cache_node *n;
|
||||||
|
@ -2116,7 +2115,6 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
add_partial(n, page, 0);
|
add_partial(n, page, 0);
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
return n;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_kmem_cache_nodes(struct kmem_cache *s)
|
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)
|
||||||
n = &s->local_node;
|
n = &s->local_node;
|
||||||
else {
|
else {
|
||||||
if (slab_state == DOWN) {
|
if (slab_state == DOWN) {
|
||||||
n = early_kmem_cache_node_alloc(gfpflags,
|
early_kmem_cache_node_alloc(gfpflags, node);
|
||||||
node);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
n = kmem_cache_alloc_node(kmalloc_caches,
|
n = kmem_cache_alloc_node(kmalloc_caches,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче