Merge branch 'slub/cleanups' into slab/next
Pekka Enberg [Mon, 4 Jun 2012 07:14:58 +0000 (10:14 +0300)]
* Fix a merge conflict in mm/slub.c::acquire_slab() due to commit 02d7633
  ("slub: fix a memory leak in get_partial_node()").

Conflicts:
mm/slub.c

Signed-off-by: Pekka Enberg <penberg@kernel.org>

1  2 
mm/slub.c

diff --cc mm/slub.c
+++ b/mm/slub.c
@@@ -1510,26 -1510,24 +1510,27 @@@ static inline void *acquire_slab(struc
         * The old freelist is the list of objects for the
         * per cpu allocation list.
         */
-       do {
-               freelist = page->freelist;
-               counters = page->counters;
-               new.counters = counters;
-               if (mode) {
-                       new.inuse = page->objects;
-                       new.freelist = NULL;
-               } else {
-                       new.freelist = freelist;
-               }
+       freelist = page->freelist;
+       counters = page->counters;
+       new.counters = counters;
 -      if (mode)
++      if (mode) {
+               new.inuse = page->objects;
++              new.freelist = NULL;
++      } else {
++              new.freelist = freelist;
++      }
  
-               VM_BUG_ON(new.frozen);
-               new.frozen = 1;
+       VM_BUG_ON(new.frozen);
+       new.frozen = 1;
  
-       } while (!__cmpxchg_double_slab(s, page,
+       if (!__cmpxchg_double_slab(s, page,
                        freelist, counters,
 -                      NULL, new.counters,
 +                      new.freelist, new.counters,
-                       "lock and freeze"));
+                       "acquire_slab"))
 -
+               return NULL;
  
        remove_partial(n, page);
+       WARN_ON(!freelist);
        return freelist;
  }