#define MAPLE_NODE4_MAX_SLOT 15
#define MAPLE_NODE4M_MAX_SLOT 14
-#define maple_retry(ms) ((ms)->tree)
struct maple_node;
/* Node 64 looks at all 64 bits of a number to decide pivots */
static inline bool _maple_is_node_4(struct maple_state *ms)
{
- /* FIXME: This just means that our node could be contained within a
- * node_4. This could happen when shrinking a node_64, for example.
- */
- return false;
+ return false; /* FIXME: Disabled */
if (maple_is_root(ms, ms->node))
return false;
return entry;
err = _maple_root_expand(ms);
if (err == -ENOMEM)
- return maple_retry(ms);
+ return MAS_START;
return NULL;
}
}
if (_maple_node_is_full(ms)) {
int ret = _maple_node_split(ms);
-
/*
* If the allocation fails, we need to drop the lock
* and restart the walk from root.
*/
if (ret == -ENOMEM)
- return maple_retry(ms);
- if (ret == -EINVAL) // FIXME: root expand on split may return an invalid insert.
- return maple_retry(ms);
+ return MAS_START;
}
entry = _maple_walk_64(ms, ms->index);
spin_lock(&ms.tree->lock);
retry:
walked = _maple_setup_insert(&ms);
+ if (walked == MAS_START)
+ goto retry;
if (walked != NULL)
goto already_exists;
- if (walked == maple_retry(&ms))
- goto retry;
ret = _maple_insert(&ms, entry);
if (ret == -ENOMEM) {