maple_tree: Small clean up for mas_spanning_store()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 22 Nov 2021 14:22:53 +0000 (09:22 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 22 Nov 2021 14:22:53 +0000 (09:22 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index fc4b8799f20bebba647036e7dcda4279a383f131..a77208d3c6f536ef602220f0a293f817f26f806c 100644 (file)
@@ -3828,6 +3828,7 @@ static inline int mas_spanning_store(struct ma_state *mas, void *entry)
        int node_count = 1 + height * 3;
        void *content, *r_content;
        unsigned long r_min, r_max;
+       unsigned char l_end;
 
        /* Holds new left and right sub-tree */
        MA_STATE(l_mas, mas->tree, mas->index, mas->index);
@@ -3877,8 +3878,8 @@ static inline int mas_spanning_store(struct ma_state *mas, void *entry)
        }
 
        /* Copy l_mas and store the value in b_node. */
-       b_node.b_end = mas_store_b_node(&l_mas, &b_node, entry,
-                                       mas_data_end(&l_mas), mas_data_end(&l_mas),
+       l_end = mas_data_end(&l_mas);
+       b_node.b_end = mas_store_b_node(&l_mas, &b_node, entry, l_end, l_end,
                                        content);
        /* Copy r_mas into b_node. */
        mas_mab_cp(&r_mas, r_mas.offset, mt_slot_count(r_mas.node),