]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
maple_tree: simplify mas_wr_node_walk()
authorPeng Zhang <zhangpeng.00@bytedance.com>
Tue, 14 Mar 2023 12:42:02 +0000 (20:42 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Apr 2023 23:29:53 +0000 (16:29 -0700)
commit97f7e09481f312b143db53cadbdfe81abac97e73
tree9cb942dea2d629635a0602a6aae7eb8e5a6ead82
parent9bc47f11525fb666a370063888904160188b024e
maple_tree: simplify mas_wr_node_walk()

Simplify code of mas_wr_node_walk() without changing functionality, and
improve readability.  Remove some special judgments.  Instead of
dynamically recording the min and max in the loop, get the final min and
max directly at the end.

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