From: Wanpeng Li Date: Thu, 4 Jul 2013 00:33:26 +0000 (+0800) Subject: mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c17fd13ec0677e61f3692ecb9d4b21f79848fa04;p=linux.git mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo Use existing interface node_nr_slabs and node_nr_objs to get nr_slabs and nr_objs. Acked-by: Christoph Lameter Signed-off-by: Wanpeng Li Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index f788be3a0b12f..5ee6c7cd9fc43 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5277,8 +5277,8 @@ void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo) if (!n) continue; - nr_slabs += atomic_long_read(&n->nr_slabs); - nr_objs += atomic_long_read(&n->total_objects); + nr_slabs += node_nr_slabs(n); + nr_objs += node_nr_objs(n); nr_free += count_partial(n, count_free); }