Skip to content

Commit

Permalink
[JFFS2] Fix hanging close for /dev/mtd character device.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joakim Tjernlund authored and David Woodhouse committed Jun 28, 2007
1 parent b75ae86 commit fd53249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/jffs2/erase.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit fd53249

Please sign in to comment.