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>
Tue, 12 Dec 2023 18:57:01 +0000 (10:57 -0800)
commit330018fe69c66333cb2115e54f1844e471668fc3
treedb7eda83e591b1889ee6cde546ddf914152ca2a9
parent026b935cd929c18d496fbf9432e8174ec40cdbc8
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