Lines Matching defs:root
127 struct ubi_wl_entry *e, struct rb_root *root);
134 * @root: the root of the tree
139 static void wl_tree_add(struct ubi_wl_entry *e, struct rb_root *root)
143 p = &root->rb_node;
164 rb_insert_color(&e->u.rb, root);
231 * @root: the root of the tree
233 * This function returns non-zero if @e is in the @root RB-tree and zero if it
236 static int in_wl_tree(struct ubi_wl_entry *e, struct rb_root *root)
240 p = root->rb_node;
312 * @root: the RB-tree where to look for
319 struct rb_root *root, int diff)
325 e = rb_entry(rb_first(root), struct ubi_wl_entry, u.rb);
328 p = root->rb_node;
347 * @root: the RB-tree where to look for
354 struct rb_root *root)
358 first = rb_entry(rb_first(root), struct ubi_wl_entry, u.rb);
359 last = rb_entry(rb_last(root), struct ubi_wl_entry, u.rb);
362 e = rb_entry(root->rb_node, struct ubi_wl_entry, u.rb);
367 e = may_reserve_for_fm(ubi, e, root);
369 e = find_wl_entry(ubi, root, WL_FREE_MAX_DIFF/2);
1605 * @root: the root of the tree to destroy
1607 static void tree_destroy(struct ubi_device *ubi, struct rb_root *root)
1612 rb = root->rb_node;
1829 ubi_rb_for_each_entry(rb2, aeb, &av->root, u.rb) {
2017 * @root: the root of the tree
2019 * This function returns zero if @e is in the @root RB-tree and %-EINVAL if it
2023 struct ubi_wl_entry *e, struct rb_root *root)
2028 if (in_wl_tree(e, root))
2032 e->pnum, e->ec, root);