Commit 76931434 authored by Pekka J Enberg's avatar Pekka J Enberg Committed by Christoph Lameter

slub: look up object from the freelist once

We only need to look up object from c->page->freelist once in
__slab_alloc().
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
parent 6446faa2
......@@ -1486,7 +1486,6 @@ load_freelist:
if (unlikely(SlabDebug(c->page)))
goto debug;
object = c->page->freelist;
c->freelist = object[c->offset];
c->page->inuse = s->objects;
c->page->freelist = NULL;
......@@ -1542,7 +1541,6 @@ new_slab:
return NULL;
debug:
object = c->page->freelist;
if (!alloc_debug_processing(s, c->page, object, addr))
goto another_slab;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment