mtd/fs/jffs2 readinode.c,1.94,1.95 nodemgmt.c,1.83,1.84

David Woodhouse dwmw2 at infradead.org
Tue Nov 12 06:17:31 EST 2002


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

Modified Files:
	readinode.c nodemgmt.c 
Log Message:
printk cleanup

Index: readinode.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/readinode.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- readinode.c	12 Nov 2002 09:51:44 -0000	1.94
+++ readinode.c	12 Nov 2002 11:17:29 -0000	1.95
@@ -250,7 +250,7 @@
 		rb_replace_node(&this->rb, &newfrag->rb, list);
 		
 		if (newfrag->ofs + newfrag->size >= this->ofs+this->size) {
-			D2(printk("Obsoleting node frag %p (%x-%x)\n", this, this->ofs, this->ofs+this->size));
+			D2(printk(KERN_DEBUG "Obsoleting node frag %p (%x-%x)\n", this, this->ofs, this->ofs+this->size));
 			jffs2_obsolete_node_frag(c, this);
 		} else {
 			this->ofs += newfrag->size;
@@ -266,7 +266,7 @@
 	*/
 	while ((this = frag_next(newfrag)) && newfrag->ofs + newfrag->size >= this->ofs + this->size) {
 		/* 'this' frag is obsoleted completely. */
-		D2(printk("Obsoleting node frag %p (%x-%x) and removing from tree\n", this, this->ofs, this->ofs+this->size));
+		D2(printk(KERN_DEBUG "Obsoleting node frag %p (%x-%x) and removing from tree\n", this, this->ofs, this->ofs+this->size));
 		rb_erase(&this->rb, list);
 		jffs2_obsolete_node_frag(c, this);
 	}

Index: nodemgmt.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodemgmt.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- nodemgmt.c	25 Sep 2002 05:52:47 -0000	1.83
+++ nodemgmt.c	12 Nov 2002 11:17:29 -0000	1.84
@@ -358,21 +358,21 @@
 	spin_lock_bh(&c->erase_completion_lock);
 
 	if (ref_flags(ref) == REF_UNCHECKED) {
-		D1(printk("Obsoleting previously unchecked node at 0x%08x of len %x: ", ref_offset(ref), ref->totlen));
-		if (jeb->unchecked_size < ref->totlen) {
+		D1(if (unlikely(jeb->unchecked_size < ref->totlen)) {
 			printk(KERN_NOTICE "raw unchecked node of size 0x%08x freed from erase block %d at 0x%08x, but unchecked_size was already 0x%08x\n",
 			       ref->totlen, blocknr, ref->flash_offset, jeb->used_size);
 			BUG();
-		}
+		})
+		D1(printk(KERN_DEBUG "Obsoleting previously unchecked node at 0x%08x of len %x: ", ref_offset(ref), ref->totlen));
 		jeb->unchecked_size -= ref->totlen;
 		c->unchecked_size -= ref->totlen;
 	} else {
-		D1(printk("Obsoleting node at 0x%08x of len %x: ", ref_offset(ref), ref->totlen));
-		if (jeb->used_size < ref->totlen) {
+		D1(if (unlikely(jeb->used_size < ref->totlen))) {
 			printk(KERN_NOTICE "raw node of size 0x%08x freed from erase block %d at 0x%08x, but used_size was already 0x%08x\n",
 			       ref->totlen, blocknr, ref->flash_offset, jeb->used_size);
 			BUG();
-		}
+		})
+		D1(printk(KERN_DEBUG "Obsoleting node at 0x%08x of len %x: ", ref_offset(ref), ref->totlen));
 		jeb->used_size -= ref->totlen;
 		c->used_size -= ref->totlen;
 	}





More information about the linux-mtd-cvs mailing list