projects/linux·commit 4ea33e2d

slub: fix atomic usage in any_slab_objects()

4ea33e2d · Benjamin Herrenschmidt <[email protected]> · 2008-05-06 20:42:39 -07:00

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 <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
4ea33e2dc2dab10960877e1649ee527c033f42c0
Parents
ba719bae

Changes

1 files changed · +1 −1

FileStatusAddDelContent
mm/slub.cmodified+1−1View file

mm/slub.c

View file
diff --git a/mm/slub.c b/mm/slub.c
index d379b78..a505a82 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;