From: Benjamin Herrenschmidt Date: Wed, 7 May 2008 03:42:39 +0000 (-0700) Subject: slub: fix atomic usage in any_slab_objects() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4ea33e2dc2dab10960877e1649ee527c033f42c0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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;