mtd/fs/jffs3 scan.c,3.14,3.15 summary.c,3.9,3.10

havasi at infradead.org havasi at infradead.org
Tue Feb 15 05:23:24 EST 2005


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

Modified Files:
	scan.c summary.c 
Log Message:

summary + nocrc fixes



Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/scan.c,v
retrieving revision 3.14
retrieving revision 3.15
diff -u -r3.14 -r3.15
--- scan.c	9 Feb 2005 14:52:05 -0000	3.14
+++ scan.c	15 Feb 2005 10:23:16 -0000	3.15
@@ -782,7 +782,9 @@
 			return -ENOMEM;
 		}
 	}
-
+#ifdef CONFIG_JFFS3_SUMMARY_NOCRCCHECK
+	ic->state = INO_STATE_UNCHECKED;
+#endif
 	/* Wheee. It worked */
 
 	raw->flash_offset = ofs | REF_UNCHECKED;
@@ -865,12 +867,20 @@
 		ERROR_MSG("Allocation of node reference failed\n");
 		return -ENOMEM;
 	}
-	ic = jffs3_scan_make_ino_cache(c, je32_to_cpu(rd->pino));
+	
+	ic = jffs3_get_ino_cache(c, je32_to_cpu(rd->pino));
 	if (!ic) {
-		jffs3_free_full_dirent(fd);
-		jffs3_free_raw_node_ref(raw);
-		return -ENOMEM;
+		ic = jffs3_scan_make_ino_cache(c, je32_to_cpu(rd->pino));
+		if (!ic) {
+			jffs3_free_full_dirent(fd);
+			jffs3_free_raw_node_ref(raw);
+			return -ENOMEM;
+		}
+	#ifdef CONFIG_JFFS3_SUMMARY_NOCRCCHECK	
+		ic->state = INO_STATE_CHECKEDABSENT;
+	#endif
 	}
+	
 
 #ifdef TMP_TOTLEN
 	raw->__totlen = PAD(je32_to_cpu(rd->totlen));

Index: summary.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/summary.c,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -r3.9 -r3.10
--- summary.c	5 Feb 2005 18:21:55 -0000	3.9
+++ summary.c	15 Feb 2005 10:23:16 -0000	3.10
@@ -422,6 +422,9 @@
 							kfree(summary);
 							return -ENOMEM;
 						}
+				#ifdef CONFIG_JFFS3_SUMMARY_NOCRCCHECK	
+					ic->state = INO_STATE_CHECKEDABSENT;
+				#endif
 					}
 
 					raw->flash_offset = (jeb->offset + je32_to_cpu(spi->offset)) | 
@@ -478,13 +481,19 @@
 						kfree(summary);
 						return -ENOMEM;
 					}
-
-					ic = jffs3_scan_make_ino_cache(c, je32_to_cpu(spd->pino));
+					
+					ic = jffs3_get_ino_cache(c, je32_to_cpu(spd->pino));
 					if (!ic) {
-						jffs3_free_full_dirent(fd);
-						jffs3_free_raw_node_ref(raw);
-						kfree(summary);
-						return -ENOMEM;
+						ic = jffs3_scan_make_ino_cache(c, je32_to_cpu(spd->pino));
+						if (!ic) {
+							jffs3_free_full_dirent(fd);
+							jffs3_free_raw_node_ref(raw);
+							kfree(summary);
+							return -ENOMEM;
+						}
+					#ifdef CONFIG_JFFS3_SUMMARY_NOCRCCHECK	
+						ic->state = INO_STATE_CHECKEDABSENT;
+					#endif
 					}
 
 #ifdef TMP_TOTLEN





More information about the linux-mtd-cvs mailing list