[IPX]: Correct argument type of ipxrtr_delete().
[powerpc.git] / mm / slab.c
index af5c523..d31a06b 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -700,6 +700,14 @@ static enum {
        FULL
 } g_cpucache_up;
 
+/*
+ * used by boot code to determine if it can use slab based allocator
+ */
+int slab_is_available(void)
+{
+       return g_cpucache_up == FULL;
+}
+
 static DEFINE_PER_CPU(struct work_struct, reap_work);
 
 static void free_block(struct kmem_cache *cachep, void **objpp, int len,
@@ -979,7 +987,8 @@ static void __drain_alien_cache(struct kmem_cache *cachep,
                 * That way we could avoid the overhead of putting the objects
                 * into the free lists and getting them back later.
                 */
-               transfer_objects(rl3->shared, ac, ac->limit);
+               if (rl3->shared)
+                       transfer_objects(rl3->shared, ac, ac->limit);
 
                free_block(cachep, ac->entry, ac->avail, node);
                ac->avail = 0;
@@ -2191,11 +2200,14 @@ static void drain_cpu_caches(struct kmem_cache *cachep)
        check_irq_on();
        for_each_online_node(node) {
                l3 = cachep->nodelists[node];
-               if (l3) {
+               if (l3 && l3->alien)
+                       drain_alien_cache(cachep, l3->alien);
+       }
+
+       for_each_online_node(node) {
+               l3 = cachep->nodelists[node];
+               if (l3)
                        drain_array(cachep, l3, l3->shared, 1, node);
-                       if (l3->alien)
-                               drain_alien_cache(cachep, l3->alien);
-               }
        }
 }