Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Benjamin Herrenschmidt and committed by
Linus Torvalds
4ea33e2d ba719bae

+1 -1
+1 -1
mm/slub.c
··· 3762 3762 if (!n) 3763 3763 continue; 3764 3764 3765 - if (atomic_read(&n->total_objects)) 3765 + if (atomic_long_read(&n->total_objects)) 3766 3766 return 1; 3767 3767 } 3768 3768 return 0;