[PATCH] SLUB Use cmpxchg() everywhere

Mathieu Desnoyers
2007-08-21T17:43:49Z

SLUB Use cmpxchg() everywhere.

It applies to "SLUB: Single atomic instruction alloc/free using
cmpxchg".

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
mm/slub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: slab/mm/slub.c
===================================================================
--- slab.orig/mm/slub.c 2007-08-20 18:42:16.000000000 -0400
+++ slab/mm/slub.c 2007-08-20 18:42:28.000000000 -0400
@@ -1682,7 +1682,7 @@ redo:

object[c->offset] = freelist;

- if (unlikely(cmpxchg_local(&c->freelist, freelist, object) != freelist))
+ if (unlikely(cmpxchg(&c->freelist, freelist, object) != freelist))
goto redo;
return;