]> 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>
Fri, 21 Apr 2023 14:12:29 +0000 (10:12 -0400)
commit23e8edaa7e87083f07510923cf5a996ebc3d41c7
tree03485db4575fc040198c1669c2bef5c765859185
parent020ab8c53fcae100372daff8f78591c934e1798b
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