aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-07-22 10:35:14 -0400
committerPekka Enberg <penberg@kernel.org>2011-07-25 13:58:19 -0400
commit9e577e8b46ab0c38970c0f0cd7eae62e6dffddee (patch)
tree068d8d50963b53a8ce25470328ff6ebe5a51b198 /mm
parent1d07171c5e58e68a76a141970a3a5e816a414ce6 (diff)
slub: When allocating a new slab also prep the first object
We need to branch to the debug code for the first object if we allocate a new slab otherwise the first object will be marked wrongly as inactive. Tested-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 7836b45ea1fa..e842c19e67fb 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2082,6 +2082,9 @@ new_slab:
2082 stat(s, ALLOC_SLAB); 2082 stat(s, ALLOC_SLAB);
2083 c->node = page_to_nid(page); 2083 c->node = page_to_nid(page);
2084 c->page = page; 2084 c->page = page;
2085
2086 if (kmem_cache_debug(s))
2087 goto debug;
2085 goto load_freelist; 2088 goto load_freelist;
2086 } 2089 }
2087 if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit()) 2090 if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())