]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/slab.c
[JFFS2] Fix summary handling of unknown but compatible nodes.
[linux-2.6-omap-h63xx.git] / mm / slab.c
index af5c5237e11a0df9d2f384383a2e8cd3b846a792..b1d643b5238de2f74ab3911d2bab4479c8745385 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;