aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2011-05-12 16:10:49 -0400
committerPekka Enberg <penberg@kernel.org>2011-05-17 15:19:00 -0400
commitbd07d87fd4b8a6af9820544b6bc6c37215d6f8ad (patch)
tree521042275e3bf152056b5683f637f5750ccf9edb /mm/slub.c
parent1393d9a1857471f816d0be1ccc1d6433a86050f6 (diff)
slub: avoid label inside conditional
Jumping to a label inside a conditional is considered poor style, especially considering the current organization of __slab_alloc(). This removes the 'load_from_page' label and just duplicates the three lines of code that it uses: c->node = page_to_nid(page); c->page = page; goto load_freelist; since it's probably not worth making this a separate helper function. Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 97bb5b8d935f..9f7bb93e17ec 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1845,7 +1845,6 @@ new_slab:
1845 page = get_partial(s, gfpflags, node); 1845 page = get_partial(s, gfpflags, node);
1846 if (page) { 1846 if (page) {
1847 stat(s, ALLOC_FROM_PARTIAL); 1847 stat(s, ALLOC_FROM_PARTIAL);
1848load_from_page:
1849 c->node = page_to_nid(page); 1848 c->node = page_to_nid(page);
1850 c->page = page; 1849 c->page = page;
1851 goto load_freelist; 1850 goto load_freelist;
@@ -1868,8 +1867,9 @@ load_from_page:
1868 1867
1869 slab_lock(page); 1868 slab_lock(page);
1870 __SetPageSlubFrozen(page); 1869 __SetPageSlubFrozen(page);
1871 1870 c->node = page_to_nid(page);
1872 goto load_from_page; 1871 c->page = page;
1872 goto load_freelist;
1873 } 1873 }
1874 if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit()) 1874 if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
1875 slab_out_of_memory(s, gfpflags, node); 1875 slab_out_of_memory(s, gfpflags, node);