mtd/fs/jffs2 write.c,1.93,1.94

Artem Bityuckiy dedekind at infradead.org
Wed Jul 20 11:50:55 EDT 2005


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

Modified Files:
	write.c 
Log Message:
[JFFS2] Initialize variables before using them.

This bug showstiself when debugging is enabled. I was introduced by me
recently.


Index: write.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/write.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- write.c	17 Jul 2005 06:56:21 -0000	1.93
+++ write.c	20 Jul 2005 15:50:51 -0000	1.94
@@ -223,8 +223,6 @@
 		  je32_to_cpu(rd->pino), name, name, je32_to_cpu(rd->ino),
 		  je32_to_cpu(rd->name_crc)));
 
-	jffs2_dbg_prewrite_paranoia_check(c, flash_ofs, vecs[0].iov_len + vecs[1].iov_len);
-
 	D1(if(je32_to_cpu(rd->hdr_crc) != crc32(0, rd, sizeof(struct jffs2_unknown_node)-4)) {
 		printk(KERN_CRIT "Eep. CRC not correct in jffs2_write_dirent()\n");
 		BUG();
@@ -236,6 +234,8 @@
 	vecs[1].iov_base = (unsigned char *)name;
 	vecs[1].iov_len = namelen;
 	
+	jffs2_dbg_prewrite_paranoia_check(c, flash_ofs, vecs[0].iov_len + vecs[1].iov_len);
+
 	raw = jffs2_alloc_raw_node_ref();
 
 	if (!raw)





More information about the linux-mtd-cvs mailing list