]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Try harder to keep active node after mas_next()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 3 Apr 2023 15:56:39 +0000 (11:56 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 2 May 2023 03:00:31 +0000 (23:00 -0400)
commit2b8a615ddffb6b7bdc72169e0874646a9aff956a
tree54ab2f80c71a88cbda7bf32d9202aadd6c04305b
parent5c6e2e3ece2a979e71b641ac76a2dd84b59cf7eb
maple_tree: Try harder to keep active node after mas_next()

Clean up the mas_next() call to try and keep a node reference when
possible.  This will avoid re-walking the tree in most cases.

Also clean up the single entry tree handling to ensure index/last are
consistent with what one would expect. (returning NULL with limit of
1-oo).

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