slab, lockdep: Annotate the locks before using them
[pandora-kernel.git] / mm / slab.c
index 0703578..6d90a09 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1666,6 +1666,9 @@ void __init kmem_cache_init_late(void)
 {
        struct kmem_cache *cachep;
 
+       /* Annotate slab for lockdep -- annotate the malloc caches */
+       init_lock_keys();
+
        /* 6) resize the head arrays to their final sizes */
        mutex_lock(&cache_chain_mutex);
        list_for_each_entry(cachep, &cache_chain, next)
@@ -1676,9 +1679,6 @@ void __init kmem_cache_init_late(void)
        /* Done! */
        g_cpucache_up = FULL;
 
-       /* Annotate slab for lockdep -- annotate the malloc caches */
-       init_lock_keys();
-
        /*
         * Register a cpu startup notifier callback that initializes
         * cpu_cache_get for all new cpus