]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Introduce mas_prev_slot() interface
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Sun, 9 Apr 2023 02:23:44 +0000 (22:23 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 24 Apr 2023 20:20:43 +0000 (16:20 -0400)
commitd35a364f4e8fdf975fc2374a1660284b85bcb0c5
tree518e299fbecf8e4924d139692b87049e9fe4e6d0
parent657d6d7e29c5e4f057bc4f28a374e163af29a105
maple_tree: Introduce mas_prev_slot() interface

Sometimes the user needs to revert to the previous slot, regardless of
if it is empty or not.  Add an interface to go to the previous slot.

Since there can't be two consecutive NULLs in the tree, the mas_prev()
function can be implemented by calling mas_prev_slot() a maximum of 2
times.  Change the underlying interface to use mas_prev_slot() to align
the code.

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