summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt2008-05-07 05:42:39 +0200
committerLinus Torvalds2008-05-08 19:46:56 +0200
commit4ea33e2dc2dab10960877e1649ee527c033f42c0 (patch)
tree5e66cd116868336d7a0fa3e6da38ebbf3e8d5a32 /mm/slub.c
parentsys_pipe(): fix file descriptor leaks (diff)
downloadkernel-qcow2-linux-4ea33e2dc2dab10960877e1649ee527c033f42c0.tar.gz
kernel-qcow2-linux-4ea33e2dc2dab10960877e1649ee527c033f42c0.tar.xz
kernel-qcow2-linux-4ea33e2dc2dab10960877e1649ee527c033f42c0.zip
slub: fix atomic usage in any_slab_objects()
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>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index d379b782fc83..a505a828ef41 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -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;