[PATCH 1/4] maple_tree: not necessary to copy mas->end + 1
Wei Yang
richard.weiyang at gmail.com
Thu Sep 19 16:48:29 PDT 2024
mas_mab_cp() copy range [mas_start, mas_end] inclusively, so we just
need to copy to mas->end which points to the last valid data in maple
node.
Signed-off-by: Wei Yang <richard.weiyang at gmail.com>
---
lib/maple_tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index a4796101decc..51f49b29b8b0 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -2099,7 +2099,7 @@ static noinline_for_kasan void mas_store_b_node(struct ma_wr_state *wr_mas,
goto b_end;
/* Copy end data to the end of the node. */
- mas_mab_cp(mas, slot, mas->end + 1, b_node, ++b_end);
+ mas_mab_cp(mas, slot, mas->end, b_node, ++b_end);
b_node->b_end--;
return;
--
2.34.1
More information about the maple-tree
mailing list