summaryrefslogtreecommitdiff
path: root/fs/jffs2/readinode.c
diff options
context:
space:
mode:
authorArtem B. Bityutskiy <dedekind@infradead.org>2005-08-03 13:26:50 +0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 20:33:09 +0300
commit392435081e8cc6e02bdc4fa998050abb11d331b4 (patch)
treeccc592e8d993d8df4285832a41f2a06bac53f979 /fs/jffs2/readinode.c
parent1e0da3cb6cd4a909c64c870344183185bd6815b1 (diff)
downloadlinux-392435081e8cc6e02bdc4fa998050abb11d331b4.tar.xz
[JFFS2] Debug code clean up - step 6
Remove extra noisy debugs Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/readinode.c')
-rw-r--r--fs/jffs2/readinode.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 488787a823b6..e6076fa5560f 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: readinode.c,v 1.135 2005/08/01 12:05:19 dedekind Exp $
+ * $Id: readinode.c,v 1.137 2005/08/03 09:26:46 dedekind Exp $
*
*/
@@ -278,10 +278,11 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
/* If we actually calculated the whole data CRC
* and it is wrong, drop the node. */
- if (unlikely(tn->partial_crc
- != je32_to_cpu(rd->data_crc)) &&
- len == csize)
+ 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;
+ }
} else if (csize == 0) {
/*
@@ -521,10 +522,8 @@ static int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_inf
bufstart = buf + (ref_offset(ref) % c->wbuf_pagesize);
/* We will read either one wbuf or 2 wbufs. */
len = c->wbuf_pagesize - (bufstart - buf);
- if (JFFS2_MIN_NODE_HEADER +
- (int)(bufstart - buf) > c->wbuf_pagesize) {
- /* The header spans the border of the
- * first wbuf */
+ if (JFFS2_MIN_NODE_HEADER + (int)(bufstart - buf) > c->wbuf_pagesize) {
+ /* The header spans the border of the first wbuf */
len += c->wbuf_pagesize;
}
} else {