Lines Matching refs:rb
266 av = rb_entry(parent, struct ubi_ainf_volume, rb); in add_volume()
293 rb_link_node(&av->rb, parent, p); in add_volume()
294 rb_insert_color(&av->rb, &ai->volumes); in add_volume()
477 aeb = rb_entry(parent, struct ubi_ainf_peb, u.rb); in ubi_add_to_av()
588 rb_link_node(&aeb->u.rb, parent, p); in ubi_add_to_av()
589 rb_insert_color(&aeb->u.rb, &av->root); in ubi_add_to_av()
608 av = rb_entry(p, struct ubi_ainf_volume, rb); in ubi_find_av()
629 struct rb_node *rb; in ubi_remove_av() local
634 while ((rb = rb_first(&av->root))) { in ubi_remove_av()
635 aeb = rb_entry(rb, struct ubi_ainf_peb, u.rb); in ubi_remove_av()
636 rb_erase(&aeb->u.rb, &av->root); in ubi_remove_av()
640 rb_erase(&av->rb, &ai->volumes); in ubi_remove_av()
1144 aeb = rb_entry(this, struct ubi_ainf_peb, u.rb); in destroy_av()
1147 if (this->rb_left == &aeb->u.rb) in destroy_av()
1167 struct rb_node *rb; in destroy_ai() local
1187 rb = ai->volumes.rb_node; in destroy_ai()
1188 while (rb) { in destroy_ai()
1189 if (rb->rb_left) in destroy_ai()
1190 rb = rb->rb_left; in destroy_ai()
1191 else if (rb->rb_right) in destroy_ai()
1192 rb = rb->rb_right; in destroy_ai()
1194 av = rb_entry(rb, struct ubi_ainf_volume, rb); in destroy_ai()
1196 rb = rb_parent(rb); in destroy_ai()
1197 if (rb) { in destroy_ai()
1198 if (rb->rb_left == &av->rb) in destroy_ai()
1199 rb->rb_left = NULL; in destroy_ai()
1201 rb->rb_right = NULL; in destroy_ai()
1264 ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { in scan_all()
1265 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) in scan_all()
1514 ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { in self_check_ai()
1557 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) { in self_check_ai()
1628 ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) { in self_check_ai()
1630 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) { in self_check_ai()
1716 ubi_rb_for_each_entry(rb1, av, &ai->volumes, rb) in self_check_ai()
1717 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) in self_check_ai()