aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c
index ecacacdce9d7..0863fd38a5ce 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3564,8 +3564,8 @@ enum slab_stat_type {
3564#define SO_CPU (1 << SL_CPU) 3564#define SO_CPU (1 << SL_CPU)
3565#define SO_OBJECTS (1 << SL_OBJECTS) 3565#define SO_OBJECTS (1 << SL_OBJECTS)
3566 3566
3567static unsigned long show_slab_objects(struct kmem_cache *s, 3567static ssize_t show_slab_objects(struct kmem_cache *s,
3568 char *buf, unsigned long flags) 3568 char *buf, unsigned long flags)
3569{ 3569{
3570 unsigned long total = 0; 3570 unsigned long total = 0;
3571 int cpu; 3571 int cpu;
@@ -3575,6 +3575,8 @@ static unsigned long show_slab_objects(struct kmem_cache *s,
3575 unsigned long *per_cpu; 3575 unsigned long *per_cpu;
3576 3576
3577 nodes = kzalloc(2 * sizeof(unsigned long) * nr_node_ids, GFP_KERNEL); 3577 nodes = kzalloc(2 * sizeof(unsigned long) * nr_node_ids, GFP_KERNEL);
3578 if (!nodes)
3579 return -ENOMEM;
3578 per_cpu = nodes + nr_node_ids; 3580 per_cpu = nodes + nr_node_ids;
3579 3581
3580 for_each_possible_cpu(cpu) { 3582 for_each_possible_cpu(cpu) {