Commit 9e86943b authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds

SLUB: use atomic_long_read for atomic_long variables

SLUB is using atomic_read() for variables declared atomic_long_t.
Switch to atomic_long_read().
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fe58103a
...@@ -3112,7 +3112,7 @@ static int list_locations(struct kmem_cache *s, char *buf, ...@@ -3112,7 +3112,7 @@ static int list_locations(struct kmem_cache *s, char *buf,
unsigned long flags; unsigned long flags;
struct page *page; struct page *page;
if (!atomic_read(&n->nr_slabs)) if (!atomic_long_read(&n->nr_slabs))
continue; continue;
spin_lock_irqsave(&n->list_lock, flags); spin_lock_irqsave(&n->list_lock, flags);
...@@ -3247,7 +3247,7 @@ static unsigned long slab_objects(struct kmem_cache *s, ...@@ -3247,7 +3247,7 @@ static unsigned long slab_objects(struct kmem_cache *s,
} }
if (flags & SO_FULL) { if (flags & SO_FULL) {
int full_slabs = atomic_read(&n->nr_slabs) int full_slabs = atomic_long_read(&n->nr_slabs)
- per_cpu[node] - per_cpu[node]
- n->nr_partial; - n->nr_partial;
...@@ -3283,7 +3283,7 @@ static int any_slab_objects(struct kmem_cache *s) ...@@ -3283,7 +3283,7 @@ static int any_slab_objects(struct kmem_cache *s)
for_each_node(node) { for_each_node(node) {
struct kmem_cache_node *n = get_node(s, node); struct kmem_cache_node *n = get_node(s, node);
if (n->nr_partial || atomic_read(&n->nr_slabs)) if (n->nr_partial || atomic_long_read(&n->nr_slabs))
return 1; return 1;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment