The _maple_mk_node encoding is only for when nodes are inserted into
the tree.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
{
if (gfpflags_allow_blocking(gfp)) {
spin_unlock(&ms->tree->lock);
- ms->alloc = _maple_mk_node(_maple_new_node(gfp));
+ ms->alloc = _maple_new_node(gfp);
spin_lock(&ms->tree->lock);
} else {
- ms->alloc = _maple_mk_node(_maple_new_node(gfp));
+ ms->alloc = _maple_new_node(gfp);
}
- if (ms->alloc == NULL)
+ if (!ms->alloc)
return false;
return true;
}
{
struct maple_node *alt_mn;
- if (ms->alloc != NULL) {
- alt_mn = _maple_to_node(ms->alloc);
+ if (ms->alloc) {
+ alt_mn = ms->alloc;
ms->alloc = NULL;
} else {
alt_mn = _maple_new_node(GFP_KERNEL | GFP_NOWAIT |