]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Fix data_end calculation and root expansion.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 3 Jan 2019 18:30:57 +0000 (13:30 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:27:59 +0000 (12:27 -0500)
commit572662f0fb843862ad489cd8bf6e292d5a11a4cc
tree8bb2a1b44ba466415879ad9fdd48468d4102f7ce
parent1b9e42e19de95e2b02bd3d5ae4498ef2baff07d4
maple_tree: Fix data_end calculation and root expansion.

Root expansion needs to set the pivot to the empty value if there is no
zero for the append to function correctly.

In append, we know the data end will always be at least 1, so take two
off the idx when checking the previous pivot value (since we also add 1
to the end for the new termination).

Append will need to be altered to cover off the overflow possibility in
the future.

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