]> 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>
Fri, 30 Oct 2020 18:55:06 +0000 (14:55 -0400)
commit3bfb75d44160a4a90120656ef0e66db2a9efb9e0
treea898c36c7f19099e5688fbd369d5ca5af4407eb7
parent1f290582cb8c77a2c480fab48de7ddf5370b446a
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