Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / fs / jffs2 / gc.c
index ad271c7..5a2dec2 100644 (file)
@@ -234,8 +234,8 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
                        return 0;
 
                jffs2_dbg(1, "No progress from erasing block; doing GC anyway\n");
-               spin_lock(&c->erase_completion_lock);
                mutex_lock(&c->alloc_sem);
+               spin_lock(&c->erase_completion_lock);
        }
 
        /* First, work out which block we're garbage-collecting */