]> Git Repo - linux.git/commit
maple_tree: try harder to keep active node with mas_prev()
authorLiam R. Howlett <[email protected]>
Thu, 18 May 2023 14:55:33 +0000 (10:55 -0400)
committerAndrew Morton <[email protected]>
Fri, 9 Jun 2023 23:25:33 +0000 (16:25 -0700)
commit39193685d585e573592e58204c445bfc5c3cafb3
tree9d7e44e8709a9828671498569472643f362c29ad
parentca80f610045d3fe57c1b43909c79d0c51badca27
maple_tree: try harder to keep active node with mas_prev()

Keep a reference to the node when possible with mas_prev().  This will
avoid re-walking the tree.  In keeping a reference to the node, keep the
last/index accurate to the range being referenced.  This means the limit
may be within the range, but the range may extend outside of the limit.

Also fix the single entry tree to respect the range (of 0), or set the
node to MAS_NONE in the case of shifting beyond 0.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Liam R. Howlett <[email protected]>
Cc: David Binderman <[email protected]>
Cc: Peng Zhang <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Vernon Yang <[email protected]>
Cc: Wei Yang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
lib/maple_tree.c
This page took 0.04141 seconds and 4 git commands to generate.