Lines Matching refs:root
1164 static struct cfq_queue *cfq_rb_first(struct cfq_rb_root *root) in cfq_rb_first() argument
1167 if (!root->count) in cfq_rb_first()
1170 if (!root->left) in cfq_rb_first()
1171 root->left = rb_first(&root->rb); in cfq_rb_first()
1173 if (root->left) in cfq_rb_first()
1174 return rb_entry(root->left, struct cfq_queue, rb_node); in cfq_rb_first()
1179 static struct cfq_group *cfq_rb_first_group(struct cfq_rb_root *root) in cfq_rb_first_group() argument
1181 if (!root->left) in cfq_rb_first_group()
1182 root->left = rb_first(&root->rb); in cfq_rb_first_group()
1184 if (root->left) in cfq_rb_first_group()
1185 return rb_entry_cfqg(root->left); in cfq_rb_first_group()
1190 static void rb_erase_init(struct rb_node *n, struct rb_root *root) in rb_erase_init() argument
1192 rb_erase(n, root); in rb_erase_init()
1196 static void cfq_rb_erase(struct rb_node *n, struct cfq_rb_root *root) in cfq_rb_erase() argument
1198 if (root->left == n) in cfq_rb_erase()
1199 root->left = NULL; in cfq_rb_erase()
1200 rb_erase_init(n, &root->rb); in cfq_rb_erase()
1201 --root->count; in cfq_rb_erase()
2081 cfq_prio_tree_lookup(struct cfq_data *cfqd, struct rb_root *root, in cfq_prio_tree_lookup() argument
2089 p = &root->rb_node; in cfq_prio_tree_lookup()
2569 struct rb_root *root = &cfqd->prio_trees[cur_cfqq->org_ioprio]; in cfqq_close() local
2574 if (RB_EMPTY_ROOT(root)) in cfqq_close()
2581 __cfqq = cfq_prio_tree_lookup(cfqd, root, sector, &parent, NULL); in cfqq_close()