Merge branch 'slab/next' into for-linus
authorPekka Enberg <penberg@kernel.org>
Mon, 23 May 2011 16:50:39 +0000 (19:50 +0300)
committerPekka Enberg <penberg@kernel.org>
Mon, 23 May 2011 16:50:39 +0000 (19:50 +0300)
Conflicts:
mm/slub.c

1  2 
mm/slub.c

diff --cc mm/slub.c
index 9d2e5e46bf09b85f6038232b6b3f32f928862ea4,9ee6f515736d188d2935903ec5acfdcaba6d0579..4ea7f1a22a9468f332f529c60e7be0b85a97616f
+++ b/mm/slub.c
@@@ -1927,9 -1932,8 +1932,8 @@@ redo
                object = __slab_alloc(s, gfpflags, node, addr, c);
  
        else {
- #ifdef CONFIG_CMPXCHG_LOCAL
                /*
 -               * The cmpxchg will only match if there was no additonal
 +               * The cmpxchg will only match if there was no additional
                 * operation and if we are on the right processor.
                 *
                 * The cmpxchg does the following atomically (without lock semantics!)
                 * Since this is without lock semantics the protection is only against
                 * code executing on this cpu *not* from access by other cpus.
                 */
 -              if (unlikely(!this_cpu_cmpxchg_double(
 +              if (unlikely(!irqsafe_cpu_cmpxchg_double(
                                s->cpu_slab->freelist, s->cpu_slab->tid,
                                object, tid,
-                               get_freepointer(s, object), next_tid(tid)))) {
+                               get_freepointer_safe(s, object), next_tid(tid)))) {
  
                        note_cmpxchg_failure("slab_alloc", s, tid);
                        goto redo;
@@@ -2136,16 -2111,13 +2111,13 @@@ redo
         */
        c = __this_cpu_ptr(s->cpu_slab);
  
- #ifdef CONFIG_CMPXCHG_LOCAL
        tid = c->tid;
        barrier();
- #endif
  
-       if (likely(page == c->page && c->node != NUMA_NO_NODE)) {
+       if (likely(page == c->page)) {
                set_freepointer(s, object, c->freelist);
  
- #ifdef CONFIG_CMPXCHG_LOCAL
 -              if (unlikely(!this_cpu_cmpxchg_double(
 +              if (unlikely(!irqsafe_cpu_cmpxchg_double(
                                s->cpu_slab->freelist, s->cpu_slab->tid,
                                c->freelist, tid,
                                object, next_tid(tid)))) {