maple_tree: avoid ascending when mas->min is also the parent's minimum
authorPeng Zhang <zhangpeng.00@bytedance.com>
Mon, 20 Nov 2023 07:09:34 +0000 (15:09 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 12 Dec 2023 18:57:00 +0000 (10:57 -0800)
commit3f05fcdebf2979569802e1ee94cf4c7d887546e2
tree34963ea9aa8f725a5a27ac31dfdca3773b96e8fd
parent2e783f0c1a0d9017209f2ed243960924ebb602cb
maple_tree: avoid ascending when mas->min is also the parent's minimum

When the child node is the first child of its parent node, mas->min does
not need to be updated. This can reduce the number of ascending times
in some cases.

Link: https://lkml.kernel.org/r/20231120070937.35481-3-zhangpeng.00@bytedance.com
Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c