[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>
This commit is contained in:
Joakim Tjernlund 2007-06-26 23:32:10 +02:00 committed by David Woodhouse
parent b75ae86035
commit fd5324909e

View file

@ -142,7 +142,7 @@ void jffs2_erase_pending_blocks(struct jffs2_sb_info *c, int count)
}
/* Be nice */
cond_resched();
yield();
spin_lock(&c->erase_completion_lock);
}