]> 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>
Fri, 21 Apr 2023 14:11:32 +0000 (10:11 -0400)
commit307131d66922397c4aad07e8967e1de17ec5d693
treea162514c12e71eae806ebf0a07aebe1a4f90455a
parent4cd2f8abd02efe46c3766c8ee61fbf796070fef2
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