Use existing interface node_nr_slabs and node_nr_objs to get nr_slabs and nr_objs.
Signed-off-by: Wanpeng Li <liw...@linux.vnet.ibm.com> --- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index e303b04..52098c2 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5287,8 +5287,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, &nr_inactive, count_free); nr_inactive_slabs += nr_inactive; } -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/