Commit 3cceb9f6 authored by Artem B. Bityuckiy's avatar Artem B. Bityuckiy Committed by Thomas Gleixner

[JFFS2] Prevent deadlock when flushing write buffer

Signed-off-by: default avatarArtem B. Bityuckiy <dedekind@infradead.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 437316d9
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* For licensing information, see the file 'LICENCE' in this directory. * For licensing information, see the file 'LICENCE' in this directory.
* *
* $Id: gc.c,v 1.146 2005/03/20 17:45:25 dedekind Exp $ * $Id: gc.c,v 1.147 2005/03/20 21:43:22 dedekind Exp $
* *
*/ */
...@@ -83,7 +83,9 @@ static struct jffs2_eraseblock *jffs2_find_gc_block(struct jffs2_sb_info *c) ...@@ -83,7 +83,9 @@ static struct jffs2_eraseblock *jffs2_find_gc_block(struct jffs2_sb_info *c)
} else if (!list_empty(&c->erasable_pending_wbuf_list)) { } else if (!list_empty(&c->erasable_pending_wbuf_list)) {
/* There are blocks are wating for the wbuf sync */ /* There are blocks are wating for the wbuf sync */
D1(printk(KERN_DEBUG "Synching wbuf in order to reuse erasable_pending_wbuf_list blocks\n")); D1(printk(KERN_DEBUG "Synching wbuf in order to reuse erasable_pending_wbuf_list blocks\n"));
spin_unlock(&c->erase_completion_lock);
jffs2_flush_wbuf_pad(c); jffs2_flush_wbuf_pad(c);
spin_lock(&c->erase_completion_lock);
goto again; goto again;
} else { } else {
/* Eep. All were empty */ /* Eep. All were empty */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment