]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: simplify mas_leaf_set_meta()
authorPeng Zhang <zhangpeng.00@bytedance.com>
Mon, 20 Nov 2023 07:09:37 +0000 (15:09 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Nov 2023 21:16:44 +0000 (13:16 -0800)
commit3eaa44642de2c975d9674984294567444839c5ee
tree028f955c00a420db57b142f3d988f0d3d20e1071
parent4c015c5369bc869e614064257bceacec8b649b41
maple_tree: simplify mas_leaf_set_meta()

Now it seems that the incoming 'end' is already pointing to the last item,
so we can simplify this function, considering only whether the last slot
is being used.  This has passed the maple tree test suite.

Link: https://lkml.kernel.org/r/20231120070937.35481-6-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