struct rb_node **p = &root->rb_node;
__u64 __s, s = BIT_START(iop);
- ASSERT(root != NULL && iop != NULL);
while (*p) {
parent = *p;
__iop = rb_entry(parent, struct io, rb_node);
return NULL;
}
-void rb_foreach(struct rb_node *n, struct io *iop,
+void rb_foreach(struct rb_node *n, struct io *iop,
void (*fnc)(struct io *iop, struct io *this),
struct list_head *head)
{
if ((iop_s <= this_s) && (this_e <= iop_e)) {
if (fnc) fnc(iop, this);
- if (head) {
- ASSERT(this->f_head.next == LIST_POISON1);
+ if (head)
list_add_tail(&this->f_head, head);
- }
}
if (iop_s < this_s)
rb_foreach(n->rb_left, iop, fnc, head);