mtd/fs/jffs2 write.c,1.53,1.54

David Woodhouse dwmw2 at infradead.org
Fri May 10 14:23:36 EDT 2002


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

Modified Files:
	write.c 
Log Message:
Fix another deadlock in error path

Index: write.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/write.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- write.c	27 Mar 2002 13:36:07 -0000	1.53
+++ write.c	10 May 2002 18:23:34 -0000	1.54
@@ -386,8 +386,10 @@
 	 */
 	ret = jffs2_reserve_space(c, sizeof(*ri), &phys_ofs, &alloclen, ALLOC_NORMAL);
 	D1(printk(KERN_DEBUG "jffs2_do_create(): reserved 0x%x bytes\n", alloclen));
-	if (ret)
+	if (ret) {
+		up(&f->sem);
 		return ret;
+	}
 
 	ri->data_crc = 0;
 	ri->node_crc = crc32(0, ri, sizeof(*ri)-8);





More information about the linux-mtd-cvs mailing list