mtd/fs/jffs2 wbuf.c,1.78,1.79

David Woodhouse dwmw2 at infradead.org
Sat Nov 20 05:21:43 EST 2004


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv16907

Modified Files:
	wbuf.c 
Log Message:
Fix deadlock on wbuf_sem if jffs2_flash_writev() is writing to a new
block and flushes the wbuf on the old.


Index: wbuf.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/wbuf.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- wbuf.c	19 Nov 2004 13:41:16 -0000	1.78
+++ wbuf.c	20 Nov 2004 10:21:40 -0000	1.79
@@ -621,7 +621,7 @@
 		/* It's a write to a new block */
 		if (c->wbuf_len) {
 			D1(printk(KERN_DEBUG "jffs2_flash_writev() to 0x%lx causes flush of wbuf at 0x%08x\n", (unsigned long)to, c->wbuf_ofs));
-			ret = __jffs2_flush_wbuf(c, 1, 1);
+			ret = __jffs2_flush_wbuf(c, 1, 0);
 			if (ret) {
 				/* the underlying layer has to check wbuf_len to do the cleanup */
 				D1(printk(KERN_WARNING "jffs2_flush_wbuf() called from jffs2_flash_writev() failed %d\n", ret));





More information about the linux-mtd-cvs mailing list