slub: Simplify control flow in __slab_alloc()

Simplify control flow a bit avoiding nesting.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Christoph Lameter 2012-05-09 10:09:54 -05:00 committed by Pekka Enberg
parent 7ced371971
commit f469743673
1 changed files with 6 additions and 8 deletions

View File

@ -2272,8 +2272,7 @@ new_slab:
/* Then do expensive stuff like retrieving pages from the partial lists */
freelist = get_partial(s, gfpflags, node, c);
if (unlikely(!freelist)) {
if (!freelist)
freelist = new_slab_objects(s, gfpflags, node, &c);
if (unlikely(!freelist)) {
@ -2283,7 +2282,6 @@ new_slab:
local_irq_restore(flags);
return NULL;
}
}
if (likely(!kmem_cache_debug(s)))
goto load_freelist;