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, 3 insertions, 3 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 69d02e3e439e..0c106d73f9c5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3112,7 +3112,7 @@ static int list_locations(struct kmem_cache *s, char *buf,
3112 unsigned long flags; 3112 unsigned long flags;
3113 struct page *page; 3113 struct page *page;
3114 3114
3115 if (!atomic_read(&n->nr_slabs)) 3115 if (!atomic_long_read(&n->nr_slabs))
3116 continue; 3116 continue;
3117 3117
3118 spin_lock_irqsave(&n->list_lock, flags); 3118 spin_lock_irqsave(&n->list_lock, flags);
@@ -3247,7 +3247,7 @@ static unsigned long slab_objects(struct kmem_cache *s,
3247 } 3247 }
3248 3248
3249 if (flags & SO_FULL) { 3249 if (flags & SO_FULL) {
3250 int full_slabs = atomic_read(&n->nr_slabs) 3250 int full_slabs = atomic_long_read(&n->nr_slabs)
3251 - per_cpu[node] 3251 - per_cpu[node]
3252 - n->nr_partial; 3252 - n->nr_partial;
3253 3253
@@ -3283,7 +3283,7 @@ static int any_slab_objects(struct kmem_cache *s)
3283 for_each_node(node) { 3283 for_each_node(node) {
3284 struct kmem_cache_node *n = get_node(s, node); 3284 struct kmem_cache_node *n = get_node(s, node);
3285 3285
3286 if (n->nr_partial || atomic_read(&n->nr_slabs)) 3286 if (n->nr_partial || atomic_long_read(&n->nr_slabs))
3287 return 1; 3287 return 1;
3288 } 3288 }
3289 return 0; 3289 return 0;