mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 06:03:24 +00:00
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>
This commit is contained in:
parent
03e404af26
commit
4eade540fc
@ -1997,9 +1997,6 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
|
|||||||
NULL, new.counters,
|
NULL, new.counters,
|
||||||
"__slab_alloc"));
|
"__slab_alloc"));
|
||||||
|
|
||||||
load_freelist:
|
|
||||||
VM_BUG_ON(!page->frozen);
|
|
||||||
|
|
||||||
if (unlikely(!object)) {
|
if (unlikely(!object)) {
|
||||||
c->page = NULL;
|
c->page = NULL;
|
||||||
stat(s, DEACTIVATE_BYPASS);
|
stat(s, DEACTIVATE_BYPASS);
|
||||||
@ -2008,6 +2005,8 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
|
|||||||
|
|
||||||
stat(s, ALLOC_REFILL);
|
stat(s, ALLOC_REFILL);
|
||||||
|
|
||||||
|
load_freelist:
|
||||||
|
VM_BUG_ON(!page->frozen);
|
||||||
c->freelist = get_freepointer(s, object);
|
c->freelist = get_freepointer(s, object);
|
||||||
c->tid = next_tid(c->tid);
|
c->tid = next_tid(c->tid);
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user