When walking the tree, handle MAS_NONE and MAS_PAUSE the same as
MAS_START.
This also fixes a potential error returned when re-walking a single
entry tree of 0 - 0.
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
{
void *entry;
+ if (mas_is_none(mas) || mas_is_paused(mas))
+ mas->node = MAS_START;
retry:
entry = mas_state_walk(mas);
if (mas_is_start(mas))
if (mas_is_ptr(mas)) {
if (!mas->index) {
mas->last = 0;
+ if (!entry)
+ entry = mas_root(mas);
} else {
mas->index = 1;
mas->last = ULONG_MAX;