Skip to contentSkip to conversation

slub: Fix atomic usage in any_slab_objects()

PATCH New Benjamin Herrenschmidt 1 participant 1 message May 7, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

 mm/slub.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/slub.c +1 -1
@@ -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;