*
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: build.c,v 1.70 2005/02/28 08:21:05 dedekind Exp $
+ * $Id: build.c,v 1.71 2005/07/12 16:37:08 dedekind Exp $
  *
  */
 
                c->blocks[i].bad_count = 0;
        }
 
-       init_MUTEX(&c->alloc_sem);
-       init_MUTEX(&c->erase_free_sem);
-       init_waitqueue_head(&c->erase_wait);
-       init_waitqueue_head(&c->inocache_wq);
-       spin_lock_init(&c->erase_completion_lock);
-       spin_lock_init(&c->inocache_lock);
-
        INIT_LIST_HEAD(&c->clean_list);
        INIT_LIST_HEAD(&c->very_dirty_list);
        INIT_LIST_HEAD(&c->dirty_list);
 
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
- * $Id: super.c,v 1.106 2005/05/18 11:37:25 dedekind Exp $
+ * $Id: super.c,v 1.107 2005/07/12 16:37:08 dedekind Exp $
  *
  */
 
        D1(printk(KERN_DEBUG "jffs2_get_sb_mtd(): New superblock for device %d (\"%s\")\n",
                  mtd->index, mtd->name));
 
+       /* Initialize JFFS2 superblock locks, the further initialization will be
+        * done later */
+       init_MUTEX(&c->alloc_sem);
+       init_MUTEX(&c->erase_free_sem);
+       init_waitqueue_head(&c->erase_wait);
+       init_waitqueue_head(&c->inocache_wq);
+       spin_lock_init(&c->erase_completion_lock);
+       spin_lock_init(&c->inocache_lock);
+
        sb->s_op = &jffs2_super_operations;
        sb->s_flags = flags | MS_NOATIME;