]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Introduce mas_prev_slot() interface
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 2 May 2023 02:13:44 +0000 (22:13 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 2 May 2023 17:51:57 +0000 (13:51 -0400)
commit0d46575f749fe721c7fdc72baac9737b66ac9033
tree96ea23e09b382d88cc2d68a31daf4c4a1381d58b
parenta772f8e86c3977b9b1263a6512b8fea6a5da1ae9
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