Lines Matching refs:rb
25 #define rb_to_kn(X) rb_entry((X), struct kernfs_node, rb)
66 struct kernfs_root *ra = kernfs_root(a), *rb = kernfs_root(b); in kernfs_common_ancestor() local
68 if (ra != rb) in kernfs_common_ancestor()
72 db = kernfs_depth(rb->kn, b); in kernfs_common_ancestor()
361 node = &pos->rb.rb_left; in kernfs_link_sibling()
363 node = &pos->rb.rb_right; in kernfs_link_sibling()
369 rb_link_node(&kn->rb, parent, node); in kernfs_link_sibling()
370 rb_insert_color(&kn->rb, &kn->parent->dir.children); in kernfs_link_sibling()
392 if (RB_EMPTY_NODE(&kn->rb)) in kernfs_unlink_sibling()
398 rb_erase(&kn->rb, &kn->parent->dir.children); in kernfs_unlink_sibling()
399 RB_CLEAR_NODE(&kn->rb); in kernfs_unlink_sibling()
655 RB_CLEAR_NODE(&kn->rb); in __kernfs_new_node()
1236 rbn = rb_next(&pos->rb); in kernfs_next_descendant_post()
1268 WARN_ON_ONCE(pos->parent && RB_EMPTY_NODE(&pos->rb)); in kernfs_activate()
1289 if (!kn || (kn->parent && RB_EMPTY_NODE(&kn->rb))) in __kernfs_remove()
1474 WARN_ON_ONCE(!RB_EMPTY_NODE(&kn->rb)); in kernfs_remove_self()
1635 struct rb_node *node = rb_next(&pos->rb); in kernfs_dir_pos()
1650 struct rb_node *node = rb_next(&pos->rb); in kernfs_dir_next_pos()