This breaks prev/next beyond the limit which is useful to do.
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
else
entry = mas_first_entry(mas, limit, &r_start);
- if (unlikely((r_start > limit))) {
- *range_start = limit;
- mas->index = mas->last = limit;
- mas->offset = offset;
- mas->node = prev_node;
- return NULL;
- }
+ if (unlikely((r_start > limit)))
+ break;
if (likely(entry)) {
if (unlikely(mas_dead_node(mas, index)))
}
*range_start = limit;
- mas->last = limit;
+ mas->last = mas->index = limit;
+ mas->offset = offset;
+ mas->node = prev_node;
return NULL;
}