]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Clean up erase function.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 25 Jan 2019 21:03:21 +0000 (16:03 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 31 Jul 2019 14:52:37 +0000 (10:52 -0400)
The node type is set during the partial copy of data operation now.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 41488104a45983c57da496533e995a9ec7508bab..c31ee5623443c853c13e5622f034314191f7b1d6 100644 (file)
@@ -780,8 +780,8 @@ static int mas_coalesce(struct ma_state *mas)
                                        dst = mas_partial_copy(mas, s_slot);
                                        if (mas_is_err(mas))
                                                return 0;
-
                                }
+
                                continue;
                        }
 
@@ -804,8 +804,6 @@ static int mas_coalesce(struct ma_state *mas)
 done:
        if (dst) {
                ret = s_slot - d_slot;
-               mas->node = mt_mk_node(mt_to_node(mas->node),
-                                      mt_node_type(mas->node));
                mt_replace(mas);
        }
        return ret;