]> 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>
Mon, 24 Apr 2023 20:20:42 +0000 (16:20 -0400)
commitc99314e4dc0f9c59fd6def195fa39ec1b43a927e
treef7d5f976d067c11cb808ce257a5dadf79c62619e
parentc19e32741fdcda1c312600d9e91101ca35a7943c
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