Skip to content

Commit

Permalink
slub: fix atomic usage in any_slab_objects()
Browse files Browse the repository at this point in the history
any_slab_objects() does an atomic_read on an atomic_long_t, this
fixes it to use atomic_long_read instead.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed May 8, 2008
1 parent ba719ba commit 4ea33e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -3762,7 +3762,7 @@ static int any_slab_objects(struct kmem_cache *s)
if (!n)
continue;

if (atomic_read(&n->total_objects))
if (atomic_long_read(&n->total_objects))
return 1;
}
return 0;
Expand Down

0 comments on commit 4ea33e2

Please sign in to comment.