From: Liam R. Howlett Date: Mon, 1 Sep 2025 06:04:36 +0000 (-0400) Subject: split destination off by one X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6d95d30e69bae2e6d9f5ae56d1b52b55ddd0234f;p=users%2Fjedix%2Flinux-maple.git split destination off by one Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 1829599763c7..f4566e5d4ef9 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3103,8 +3103,8 @@ void spanning_split_dest_setup(struct maple_copy *cp, struct ma_state *mas, enum maple_type mt) { cp->d_count = 0; - /* Calc split here */ - if (cp->data <= mt_slots[mt]) { + /* Calc split here; cp->data is not 0 indexed */ + if (cp->data < mt_slots[mt]) { cp->split = cp->data; cp->d_count = 1; } else if (cp->data < mt_slots[mt] * 2 - 1) {