struct cache_extent *pe)
{
struct rb_node *found;
+ struct cache_extent *entry;
found = tree_insert(&tree->root, pe->start, pe->size, &pe->rb_node);
- if (found)
+ if (found) {
+ entry = rb_entry(found, struct cache_extent, rb_node);
return -EEXIST;
+ }
return 0;
}