aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-05-09 11:09:54 -0400
committerPekka Enberg <penberg@kernel.org>2012-06-01 02:25:40 -0400
commitf469743673ceda5181970eb6b8090ba728c956fb (patch)
treed9147f0a1595b7af4cd1499eece9dbae2fd48b33
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>
-rw-r--r--mm/slub.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 9892775349bf..5aacd434e2cb 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2272,17 +2272,15 @@ new_slab:
2272 /* Then do expensive stuff like retrieving pages from the partial lists */ 2272 /* Then do expensive stuff like retrieving pages from the partial lists */
2273 freelist = get_partial(s, gfpflags, node, c); 2273 freelist = get_partial(s, gfpflags, node, c);
2274 2274
2275 if (unlikely(!freelist)) { 2275 if (!freelist)
2276
2277 freelist = new_slab_objects(s, gfpflags, node, &c); 2276 freelist = new_slab_objects(s, gfpflags, node, &c);
2278 2277
2279 if (unlikely(!freelist)) { 2278 if (unlikely(!freelist)) {
2280 if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit()) 2279 if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
2281 slab_out_of_memory(s, gfpflags, node); 2280 slab_out_of_memory(s, gfpflags, node);
2282 2281
2283 local_irq_restore(flags); 2282 local_irq_restore(flags);
2284 return NULL; 2283 return NULL;
2285 }
2286 } 2284 }
2287 2285
2288 if (likely(!kmem_cache_debug(s))) 2286 if (likely(!kmem_cache_debug(s)))