mtd/fs/jffs2 nodelist.c,1.52,1.53

David Woodhouse dwmw2 at infradead.org
Tue Sep 3 17:56:04 EDT 2002


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

Modified Files:
	nodelist.c 
Log Message:
debugging

Index: nodelist.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodelist.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- nodelist.c	3 Sep 2002 21:43:17 -0000	1.52
+++ nodelist.c	3 Sep 2002 21:56:02 -0000	1.53
@@ -516,9 +516,14 @@
 	/* If we have a right-hand child, go down and then left as far
 	   as we can. */
 	if (node->rb_right) {
+		D1(printk("Following right pointer frmo %p to %p\n",
+		       node, node->rb_right));
 		node = node->rb_right; 
-		while (node->rb_left)
+		while (node->rb_left) {
+			D1(printk("Following left pointer from %p to %p\n",
+				  node, node->rb_left));
 			node=node->rb_left;
+		}
 		return node;
 	}
 
@@ -528,9 +533,12 @@
 	   ancestor is a right-hand child of its parent, keep going
 	   up. First time it's a left-hand child of its parent, said
 	   parent is our 'next' node. */
-	while (node->rb_parent && node == node->rb_parent->rb_right)
+	while (node->rb_parent && node == node->rb_parent->rb_right) {
+		D1(printk("Following parent pointer frmo %p to %p\n",
+			  node, node->rb_parent));
 		node = node->rb_parent;
-
+	}
+	D1(printk("Returning parent %p\n", node->rb_parent));
 	return node->rb_parent;
 }
 





More information about the linux-mtd-cvs mailing list