Merge branches 'slab/cleanups', 'slab/failslab', 'slab/fixes' and 'slub/percpu' into...
[sfrench/cifs-2.6.git] / mm / slab.c
index f9626d51a4b1a4c1750bbbb38aab150af27daab0..a9f325b28bed145a4aab6ff8414b074d3b233280 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -982,13 +982,11 @@ static struct array_cache **alloc_alien_cache(int node, int limit, gfp_t gfp)
 
        if (limit > 1)
                limit = 12;
-       ac_ptr = kmalloc_node(memsize, gfp, node);
+       ac_ptr = kzalloc_node(memsize, gfp, node);
        if (ac_ptr) {
                for_each_node(i) {
-                       if (i == node || !node_online(i)) {
-                               ac_ptr[i] = NULL;
+                       if (i == node || !node_online(i))
                                continue;
-                       }
                        ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d, gfp);
                        if (!ac_ptr[i]) {
                                for (i--; i >= 0; i--)
@@ -3102,7 +3100,7 @@ static bool slab_should_failslab(struct kmem_cache *cachep, gfp_t flags)
        if (cachep == &cache_cache)
                return false;
 
-       return should_failslab(obj_size(cachep), flags);
+       return should_failslab(obj_size(cachep), flags, cachep->flags);
 }
 
 static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)