[JFFS2] Fix hanging close for /dev/mtd character device.
When pdflush is erasing lots of sectors, drivers calling
mtd->sync will hang until all blocks are erased. Be nicer.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index 66e7c2f..bdab9bc 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -142,7 +142,7 @@
}
/* Be nice */
- cond_resched();
+ yield();
spin_lock(&c->erase_completion_lock);
}