mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo
authorWanpeng Li <liwanp@linux.vnet.ibm.com>
Thu, 4 Jul 2013 00:33:26 +0000 (08:33 +0800)
committerPekka Enberg <penberg@kernel.org>
Sun, 7 Jul 2013 15:37:48 +0000 (18:37 +0300)
Use existing interface node_nr_slabs and node_nr_objs to get
nr_slabs and nr_objs.

Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slub.c

index f788be3..5ee6c7c 100644 (file)
--- 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);
        }