]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: mas_next() and mas_find() state clean up
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 10 Feb 2023 21:36:28 +0000 (16:36 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 13 Feb 2023 13:42:04 +0000 (08:42 -0500)
commit9b74b1c635cdb50aa97ef6bea1b573bfbc63924b
tree40f25e0cf7cbc34d163345f1087cfb6d2a54b5d2
parentf929a6d005c773492bd4d494478fced2ac5f8256
maple_tree: mas_next() and mas_find() state clean up

mas_next() and mas_find() were not properly setting the internal maple
state when the limits of the search were reached.

mas_find() was not treating MAS_NONE as MAS_PAUSE, so an entry could be
skipped if mas_find() was used after a completed mas_prev() that was
empty.

mas_find() was not correctly setting the node to MAS_NONE on a second
mas_find() on a single entry tree of 0 - 0.

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