]> 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>
Thu, 27 Apr 2023 01:40:55 +0000 (21:40 -0400)
commit530d23be2c2f87b3eb9448ce81c898954cf8b19b
treea91b9f79dd5a7c6b33d738b58539c885e6e48147
parentc7ef3210f3abd57ff606aec8ee68916804317530
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