[PATCH] slub: Fix atomic usage in any_slab_objects()

From: Benjamin Herrenschmidt
Date: Tue May 06 2008 - 20:40:47 EST


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@xxxxxxxxxxxxxxxxxxx>
---

mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-work.orig/mm/slub.c 2008-05-07 10:37:04.000000000 +1000
+++ linux-work/mm/slub.c 2008-05-07 10:37:05.000000000 +1000
@@ -3762,7 +3762,7 @@ static int any_slab_objects(struct kmem_
if (!n)
continue;

- if (atomic_read(&n->total_objects))
+ if (atomic_long_read(&n->total_objects))
return 1;
}
return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/