summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-06-01 19:25:59 +0200
committerPekka Enberg <penberg@kernel.org>2011-07-02 12:26:57 +0200
commit4eade540fc35353813097bfdb39465c9b8847a15 (patch)
tree3e92af005f3fea4d84de049764c72fac95150e7c /mm/slub.c
parentslub: fast release on full slab (diff)
downloadlinux-4eade540fc35353813097bfdb39465c9b8847a15.tar.xz
linux-4eade540fc35353813097bfdb39465c9b8847a15.zip
slub: Not necessary to check for empty slab on load_freelist
load_freelist is now only branched to only if there are objects available. So no need to check the object variable for NULL. Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 25dac48c1c60..78c488202f7d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1997,9 +1997,6 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
NULL, new.counters,
"__slab_alloc"));
-load_freelist:
- VM_BUG_ON(!page->frozen);
-
if (unlikely(!object)) {
c->page = NULL;
stat(s, DEACTIVATE_BYPASS);
@@ -2008,6 +2005,8 @@ load_freelist:
stat(s, ALLOC_REFILL);
+load_freelist:
+ VM_BUG_ON(!page->frozen);
c->freelist = get_freepointer(s, object);
c->tid = next_tid(c->tid);
local_irq_restore(flags);