Skip to content

Commit

Permalink
slub: fixed uninitialized counter in struct kmem_cache_node
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Salman Qazi <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
  • Loading branch information
sqazi authored and Pekka Enberg committed Sep 15, 2008
1 parent bc45eb8 commit 02b71b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 02b71b7

Please sign in to comment.