diff options
author | Christoph Lameter <cl@linux.com> | 2012-05-09 11:09:54 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-06-01 02:25:40 -0400 |
commit | f469743673ceda5181970eb6b8090ba728c956fb (patch) | |
tree | d9147f0a1595b7af4cd1499eece9dbae2fd48b33 /mm/slub.c | |
parent | 7ced3719719669ad6bd279b45fa3c1a517b2e057 (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.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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))) |