From fd5324909e410a3202c1b01bd507c2dfba58fca5 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Tue, 26 Jun 2007 23:32:10 +0200 Subject: [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 Signed-off-by: David Woodhouse --- fs/jffs2/erase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index 66e7c2f1e644..bdab9bc51d65 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c @@ -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); } -- cgit v1.2.1