mtd/fs/jffs2 wbuf.c,1.19,1.20

David Woodhouse dwmw2 at infradead.org
Tue Nov 12 06:33:04 EST 2002


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

Modified Files:
	wbuf.c 
Log Message:
Don't del_timer() an uninitialised timer

Index: wbuf.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/wbuf.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- wbuf.c	12 Nov 2002 09:42:01 -0000	1.19
+++ wbuf.c	12 Nov 2002 11:33:02 -0000	1.20
@@ -125,7 +125,12 @@
 {
 	int ret;
 	size_t retlen;
-	
+
+	/* Nothing to do if not NAND flash. In particular, we shouldn't
+	   del_timer() the timer we never initialised. */
+	if (jffs2_can_mark_obsolete(c))
+		return 0;
+
 	if (!down_trylock(&c->alloc_sem)) {
 		up(&c->alloc_sem);
 		printk(KERN_CRIT "jffs2_flush_wbuf() called with alloc_sem not locked!\n");





More information about the linux-mtd-cvs mailing list