We can avoid deactivate slab in special cases if we do the
deactivation of slabs in each code flow that leads to new_slab.
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
if (!page)
goto new_slab;
- if (unlikely(!node_match(c, node)))
- goto another_slab;
+ if (unlikely(!node_match(c, node))) {
+ deactivate_slab(s, c);
+ goto new_slab;
+ }
stat(s, ALLOC_SLOWPATH);
VM_BUG_ON(!page->frozen);
if (unlikely(!object))
- goto another_slab;
+ goto new_slab;
stat(s, ALLOC_REFILL);
local_irq_restore(flags);
return object;
-another_slab:
- deactivate_slab(s, c);
-
new_slab:
page = get_partial(s, gfpflags, node);
if (page) {