[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: JFFS2:0 powerfailtesting-checkfs:4



ok, that fixed that problem. Testing is now continuing on from that
point.

Vipin


-----Original Message-----
From: David Woodhouse
To: Vipin Malik
Cc: 'jffs-dev '
Sent: 4/5/01 11:43 AM
Subject: Re: JFFS2:0 powerfailtesting-checkfs:4 


Vipin.Malik@xxxxxxx.com said:
> Kernel panic: Out of memory and no killable processes... 

I hereby declare myself to be Today's Official Mr F*** All Good.

Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- scan.c	2001/03/26 13:25:33	1.41
+++ scan.c	2001/04/05 16:42:13	1.42
@@ -31,7 +31,7 @@
  * provisions above, a recipient may use your version of this file
  * under either the RHEPL or the GPL.
  *
- * $Id: scan.c,v 1.41 2001/03/26 13:25:33 dwmw2 Exp $
+ * $Id: scan.c,v 1.42 2001/04/05 16:42:13 dwmw2 Exp $
  *
  */
 #include <linux/kernel.h>
@@ -318,10 +318,12 @@
 		ret = c->mtd->read(c->mtd, curofs, min(PAGE_SIZE,
scanlen), &retlen, (char *)buf);
 		if(ret) {
 			D1(printk(KERN_WARNING "jffs2_scan_empty(): Read
0x%lx bytes at 0x%08x returned %d\n", min(PAGE_SIZE, scanlen), curofs,
ret));
+			kfree(buf);
 			return ret;
 		}
 		if (retlen < 4) {
 			D1(printk(KERN_WARNING "Eep. too few bytes read
in scan_empty()\n"));
+			kfree(buf);
 			return -EIO;
 		}
 		for (i=0; i<(retlen / 4); i++) {
@@ -331,6 +333,7 @@
 				noisy_printk(noise, "jffs2_scan_empty():
Empty block at 0x%08x ends at 0x%08x (with 0x%08x)! Marking dirty\n",
*startofs, curofs, buf[i]);
 				DIRTY_SPACE(curofs - (*startofs));
 				*startofs = curofs;
+				kfree(buf);
 				return 0;
 			}
 		}
@@ -339,6 +342,7 @@
 	}
 
 	D1(printk(KERN_DEBUG "Empty flash detected from 0x%08x to
0x%08x\n", *startofs, curofs));
+	kfree(buf);
 	*startofs = curofs;
 	return 0;
 }


--
dwmw2



To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com