mtd/fs/jffs2 write.c,1.61,1.62
Joakim Tjernlund
jocke at infradead.org
Fri Jan 10 11:53:14 EST 2003
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv20809
Modified Files:
write.c
Log Message:
Only enable writecheck() when debugging
Index: write.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/write.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- write.c 10 Jan 2003 16:01:51 -0000 1.61
+++ write.c 10 Jan 2003 16:53:12 -0000 1.62
@@ -55,6 +55,7 @@
return 0;
}
+#if CONFIG_JFFS2_FS_DEBUG > 0
static void writecheck(struct jffs2_sb_info *c, uint32_t ofs)
{
unsigned char buf[16];
@@ -79,7 +80,7 @@
buf[8], buf[9], buf[10], buf[11], buf[12], buf[13], buf[14], buf[15]);
}
}
-
+#endif
/* jffs2_write_dnode - given a raw_inode, allocate a full_dnode for it,
@@ -105,7 +106,7 @@
vecs[1].iov_base = (unsigned char *)data;
vecs[1].iov_len = datalen;
- writecheck(c, flash_ofs);
+ D1(writecheck(c, flash_ofs));
if (je32_to_cpu(ri->totlen) != sizeof(*ri) + datalen) {
printk(KERN_WARNING "jffs2_write_dnode: ri->totlen (0x%08x) != sizeof(*ri) (0x%08x) + datalen (0x%08x)\n", je32_to_cpu(ri->totlen), sizeof(*ri), datalen);
@@ -194,7 +195,7 @@
D1(printk(KERN_DEBUG "jffs2_write_dirent(ino #%u, name at *0x%p \"%s\"->ino #%u, name_crc 0x%08x)\n",
je32_to_cpu(rd->pino), name, name, je32_to_cpu(rd->ino),
je32_to_cpu(rd->name_crc)));
- writecheck(c, flash_ofs);
+ D1(writecheck(c, flash_ofs));
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");
More information about the linux-mtd-cvs
mailing list