mtd/fs/jffs2 readinode.c,1.137,1.138

Artem Bityuckiy dedekind at infradead.org
Wed Aug 3 05:28:09 EDT 2005


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

Modified Files:
	readinode.c 
Log Message:
[JFFS2] bugfix: len is the size until the end of page, not the node len



Index: readinode.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/readinode.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- readinode.c	3 Aug 2005 09:26:46 -0000	1.137
+++ readinode.c	3 Aug 2005 09:28:06 -0000	1.138
@@ -278,7 +278,7 @@
 
 			/* If we actually calculated the whole data CRC
 			 * and it is wrong, drop the node. */
-			if (len == csize && unlikely(tn->partial_crc != je32_to_cpu(rd->data_crc))) {
+			if (len >= csize && unlikely(tn->partial_crc != je32_to_cpu(rd->data_crc))) {
 				JFFS2_NOTICE("wrong data CRC in data node at 0x%08x: read %#08x, calculated %#08x.\n",
 					ref_offset(ref), tn->partial_crc, je32_to_cpu(rd->data_crc));
 				goto free_out;





More information about the linux-mtd-cvs mailing list