mtd/fs/jffs2 readinode.c,1.83,1.84

David Woodhouse dwmw2 at infradead.org
Tue Sep 3 18:35:12 EDT 2002


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

Modified Files:
	readinode.c 
Log Message:
Er, sometimes we _know_ it'll be inconsistent. 


Index: readinode.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/readinode.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- readinode.c	3 Sep 2002 22:29:29 -0000	1.83
+++ readinode.c	3 Sep 2002 22:35:09 -0000	1.84
@@ -20,7 +20,7 @@
 #include "nodelist.h"
 
 
-D1(static void jffs2_print_fragtree(rb_root_t *list)
+D1(static void jffs2_print_fragtree(rb_root_t *list, int permitbug)
 {
 	struct jffs2_node_frag *this = frag_first(list);
 	uint32_t lastofs = 0;
@@ -36,14 +36,14 @@
 		lastofs = this->ofs+this->size;
 		this = frag_next(this);
 	}
-	if (buggy) {
+	if (buggy && !permitbug) {
 		printk(KERN_CRIT "Frag tree got a hole in it\n");
 		BUG();
 	}
 })
 D1(void jffs2_print_frag_list(struct jffs2_inode_info *f)
 {
-	jffs2_print_fragtree(&f->fragtree);
+	jffs2_print_fragtree(&f->fragtree, 0);
 
 	if (f->metadata) {
 		printk(KERN_DEBUG "metadata at 0x%08x\n", f->metadata->raw->flash_offset &~3);
@@ -227,10 +227,10 @@
 			this->ofs += newfrag->size;
 			this->size -= newfrag->size;
 			printk("before inserting new shrunk frag %d-%d:\n", this->ofs, this->ofs+this->size);
-			jffs2_print_fragtree(list);
+			jffs2_print_fragtree(list, 1);
 			jffs2_fragtree_insert(this, newfrag);
 			printk("inserted:\n");
-			jffs2_print_fragtree(list);
+			jffs2_print_fragtree(list, 1);
 			rb_insert_color(&this->rb, list);
 			return 0;
 		}





More information about the linux-mtd-cvs mailing list