summaryrefslogtreecommitdiff
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-06-01 12:25:56 -0500
committerPekka Enberg <penberg@kernel.org>2011-07-02 13:26:56 +0300
commitfc59c05306fe1dcfa3fb8ba34ed45407fba4689c (patch)
treeb187d9819cdb921fb6b575d10e487915b2a89dbe /mm/slub.c
parent80f08c191f6c9563641291bea80657a3b9faabf0 (diff)
downloadlinux-3.10-fc59c05306fe1dcfa3fb8ba34ed45407fba4689c.tar.gz
linux-3.10-fc59c05306fe1dcfa3fb8ba34ed45407fba4689c.tar.bz2
linux-3.10-fc59c05306fe1dcfa3fb8ba34ed45407fba4689c.zip
slub: Get rid of the another_slab label
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>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/slub.c b/mm/slub.c
index cb6b0857e1a..41a15c1d806 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1965,8 +1965,10 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
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);
@@ -1986,7 +1988,7 @@ load_freelist:
VM_BUG_ON(!page->frozen);
if (unlikely(!object))
- goto another_slab;
+ goto new_slab;
stat(s, ALLOC_REFILL);
@@ -1995,9 +1997,6 @@ load_freelist:
local_irq_restore(flags);
return object;
-another_slab:
- deactivate_slab(s, c);
-
new_slab:
page = get_partial(s, gfpflags, node);
if (page) {