aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/readinode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/readinode.c')
-rw-r--r--fs/jffs2/readinode.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 5ea4faafa2d3..5fec012b02ed 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -66,7 +66,7 @@ static void jffs2_free_tmp_dnode_info_list(struct rb_root *list)
66 jffs2_free_full_dnode(tn->fn); 66 jffs2_free_full_dnode(tn->fn);
67 jffs2_free_tmp_dnode_info(tn); 67 jffs2_free_tmp_dnode_info(tn);
68 68
69 this = this->rb_parent; 69 this = rb_parent(this);
70 if (!this) 70 if (!this)
71 break; 71 break;
72 72
@@ -708,12 +708,12 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
708 jffs2_mark_node_obsolete(c, fn->raw); 708 jffs2_mark_node_obsolete(c, fn->raw);
709 709
710 BUG_ON(rb->rb_left); 710 BUG_ON(rb->rb_left);
711 if (rb->rb_parent && rb->rb_parent->rb_left == rb) { 711 if (rb_parent(rb) && rb_parent(rb)->rb_left == rb) {
712 /* We were then left-hand child of our parent. We need 712 /* We were then left-hand child of our parent. We need
713 * to move our own right-hand child into our place. */ 713 * to move our own right-hand child into our place. */
714 repl_rb = rb->rb_right; 714 repl_rb = rb->rb_right;
715 if (repl_rb) 715 if (repl_rb)
716 repl_rb->rb_parent = rb->rb_parent; 716 rb_set_parent(repl_rb, rb_parent(rb));
717 } else 717 } else
718 repl_rb = NULL; 718 repl_rb = NULL;
719 719
@@ -721,14 +721,14 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
721 721
722 /* Remove the spent tn from the tree; don't bother rebalancing 722 /* Remove the spent tn from the tree; don't bother rebalancing
723 * but put our right-hand child in our own place. */ 723 * but put our right-hand child in our own place. */
724 if (tn->rb.rb_parent) { 724 if (rb_parent(&tn->rb)) {
725 if (tn->rb.rb_parent->rb_left == &tn->rb) 725 if (rb_parent(&tn->rb)->rb_left == &tn->rb)
726 tn->rb.rb_parent->rb_left = repl_rb; 726 rb_parent(&tn->rb)->rb_left = repl_rb;
727 else if (tn->rb.rb_parent->rb_right == &tn->rb) 727 else if (rb_parent(&tn->rb)->rb_right == &tn->rb)
728 tn->rb.rb_parent->rb_right = repl_rb; 728 rb_parent(&tn->rb)->rb_right = repl_rb;
729 else BUG(); 729 else BUG();
730 } else if (tn->rb.rb_right) 730 } else if (tn->rb.rb_right)
731 tn->rb.rb_right->rb_parent = NULL; 731 rb_set_parent(tn->rb.rb_right, NULL);
732 732
733 jffs2_free_tmp_dnode_info(tn); 733 jffs2_free_tmp_dnode_info(tn);
734 if (ret) { 734 if (ret) {