From: Joakim Tjernlund Date: Tue, 26 Jun 2007 21:32:10 +0000 (+0200) Subject: [JFFS2] Fix hanging close for /dev/mtd character device. X-Git-Tag: v2.6.24-rc1~1364^2~97 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=fd5324909e410a3202c1b01bd507c2dfba58fca5;p=linux.git [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 --- 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); }