]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/jffs2/scan.c
jffs2: Use jffs2_garbage_collect_trigger() to trigger pending erases
[net-next-2.6.git] / fs / jffs2 / scan.c
index 696686cc206e1d807df1b6706a4a1a54f3f6b2bf..46f870d1cc36ffaca178be3e62c600186e23d7f6 100644 (file)
@@ -260,7 +260,9 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
                        ret = -EIO;
                        goto out;
                }
-               jffs2_erase_pending_trigger(c);
+               spin_lock(&c->erase_completion_lock);
+               jffs2_garbage_collect_trigger(c);
+               spin_unlock(&c->erase_completion_lock);
        }
        ret = 0;
  out: