tree d3c12091e821b7a98da9a58d9d11f648699d207c
parent 265489f01d8c05f7aae174651a98854af090efc0
author Artem B. Bityuckiy <[EMAIL PROTECTED]> Wed, 06 Jul 2005 15:43:18 +0100
committer Thomas Gleixner <[EMAIL PROTECTED]> Wed, 06 Jul 2005 18:30:00 +0200
[JFFS2] Simplify the tree insert code.
It isn't _normal_ that we allow key collision in rbtrees,
but it does not matter as long as the two nodes with the same
version are together.
Signed-off-by: Artem B. Bityuckiy <[EMAIL PROTECTED]>
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
fs/jffs2/nodelist.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
--- a/fs/jffs2/nodelist.c
+++ b/fs/jffs2/nodelist.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: nodelist.c,v 1.95 2005/07/05 21:03:07 dwmw2 Exp $
+ * $Id: nodelist.c,v 1.97 2005/07/06 15:18:41 dwmw2 Exp $
*
*/
@@ -69,12 +69,11 @@ static void jffs2_add_tn_to_list(struct
parent = *p;
this = rb_entry(parent, struct jffs2_tmp_dnode_info, rb);
+ /* There may actually be a collision here, but it doesn't
+ actually matter. As long as the two nodes with the same
+ version are together, it's all fine. */
if (tn->version < this->version)
p = &(*p)->rb_left;
- else if (tn->version > this->version)
- p = &(*p)->rb_right;
- else if (tn < this)
- p = &(*p)->rb_left;
else
p = &(*p)->rb_right;
}
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html