Merge branch 'slub/cleanups' into slab/next
authorPekka Enberg <penberg@kernel.org>
Mon, 4 Jun 2012 07:14:58 +0000 (10:14 +0300)
committerPekka Enberg <penberg@kernel.org>
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
index 8c691fa1cf3c78a91fa301bcd0cd323df1b28a1e,719509eaa46774fcc132644f6a0b0c1da70f2773..2de3c996f327079bdae3de9262bf69ba2bab496e
+++ 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;
  }