From: Salman Qazi Date: Thu, 11 Sep 2008 19:25:41 +0000 (-0700) Subject: slub: fixed uninitialized counter in struct kmem_cache_node X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02b71b70129aaaa38f280af2aa5a767a4dec9107;p=linux-2.6 slub: fixed uninitialized counter in struct kmem_cache_node Initialized total objects atomic for the node in init_kmem_cache_node. The uninitialized value was ruining the stats in /proc/slabinfo. Acked-by: Christoph Lameter Signed-off-by: Salman Qazi Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index fb486d5540..0c83e6afe7 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1932,6 +1932,7 @@ init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s) INIT_LIST_HEAD(&n->partial); #ifdef CONFIG_SLUB_DEBUG atomic_long_set(&n->nr_slabs, 0); + atomic_long_set(&n->total_objects, 0); INIT_LIST_HEAD(&n->full); #endif }