mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] slub: Fix atomic usage in any_slab_objects()
@ 2008-05-07  0:38 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2008-05-07  0:38 UTC (permalink / raw)
  To: clameter; +Cc: linux-kernel, Andrew Morton

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

 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-07  0:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-07  0:38 [PATCH] slub: Fix atomic usage in any_slab_objects() Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®