slub: fix atomic usage in any_slab_objects()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Thursday, May 8, 2008 - 5:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ea33e...
Commit:     4ea33e2dc2dab10960877e1649ee527c033f42c0
Parent:     ba719baeabbff5476eeb91c223e6921ba29e1490
Author:     Benjamin Herrenschmidt <benh@kernel.crashing.org>
AuthorDate: Tue May 6 20:42:39 2008 -0700
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Thu May 8 10:46:56 2008 -0700

    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>
---
 mm/slub.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index d379b78..a505a82 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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
slub: fix atomic usage in any_slab_objects(), Linux Kernel Mailing List..., (Thu May 8, 5:59 pm)