mtd/fs/jffs2 scan.c,1.108,1.109

David Woodhouse dwmw2 at infradead.org
Fri Mar 19 11:40:53 EST 2004


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

Modified Files:
	scan.c 
Log Message:
Fix endless loop in scan of empty flash. Noticed by Kerry Kopp.

Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- scan.c	16 Mar 2004 19:37:15 -0000	1.108
+++ scan.c	19 Mar 2004 16:40:50 -0000	1.109
@@ -402,10 +402,10 @@
 
 			empty_start = ofs;
 			ofs += 4;
-			inbuf_ofs = ofs - buf_ofs;
 
 			D1(printk(KERN_DEBUG "Found empty flash at 0x%08x\n", ofs));
 		more_empty:
+			inbuf_ofs = ofs - buf_ofs;
 			while (inbuf_ofs < buf_len) {
 				if (*(uint32_t *)(&buf[inbuf_ofs]) != 0xffffffff) {
 					printk(KERN_WARNING "Empty flash at 0x%08x ends at 0x%08x\n",




More information about the linux-mtd-cvs mailing list