Skip to content

Commit

Permalink
[JFFS2] Prevent deadlock when flushing write buffer
Browse files Browse the repository at this point in the history
Signed-off-by: Artem B. Bityuckiy <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
dedekind authored and Thomas Gleixner committed May 23, 2005
1 parent 437316d commit 3cceb9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/jffs2/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* 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 $
*
*/

Expand Down Expand Up @@ -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)) {
/* 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"));
spin_unlock(&c->erase_completion_lock);
jffs2_flush_wbuf_pad(c);
spin_lock(&c->erase_completion_lock);
goto again;
} else {
/* Eep. All were empty */
Expand Down

0 comments on commit 3cceb9f

Please sign in to comment.