Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c17fd13e authored by Wanpeng Li's avatar Wanpeng Li Committed by Pekka Enberg
Browse files

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: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarWanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent a4463364
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
	}