aboutsummaryrefslogtreecommitdiff
path: root/mm/slub.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-05-09 10:09:54 -0500
committerPekka Enberg <penberg@kernel.org>2012-06-01 09:25:40 +0300
commitf469743673ceda5181970eb6b8090ba728c956fb (patch)
treed9147f0a1595b7af4cd1499eece9dbae2fd48b33 /mm/slub.c
parent7ced3719719669ad6bd279b45fa3c1a517b2e057 (diff)
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>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 9892775349b..5aacd434e2c 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2272,17 +2272,15 @@ 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)) {
- if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
- slab_out_of_memory(s, gfpflags, node);
+ if (unlikely(!freelist)) {
+ if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
+ slab_out_of_memory(s, gfpflags, node);
- local_irq_restore(flags);
- return NULL;
- }
+ local_irq_restore(flags);
+ return NULL;
}
if (likely(!kmem_cache_debug(s)))