]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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>
Mon, 20 Nov 2023 21:16:43 +0000 (13:16 -0800)
commit4ee8154a22ec3f8de61841a75317b21730adb767
tree6577cba3395dbc8dfe6f81aa6f1f34f3228841a8
parent98ce16bb1d2dd69d914e2a40b0b5e95a6229eda1
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