[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:
parent
b75ae86035
commit
fd5324909e
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue