These are some small cleanups of maple tree.
Just to mention, in v1, I forgot to CC LKML, but it has been added in this
version.
Changes since v1:
- Removed the 'return' statement from [1/5].
- Made slight modifications to the commit log of [5/5].
v1: http://lists.infradead.org/pipermail/maple-tree/2023-November/003047.html
Peng Zhang (5):
maple_tree: Move the check forward to avoid static check warning
maple_tree: Avoid ascending when mas->min is also the parent's minimum
maple_tree: Remove an unused parameter for ma_meta_end()
maple_tree: Delete one of the two identical checks
maple_tree: Simplify mas_leaf_set_meta()
lib/maple_tree.c | 45 ++++++++++++++-------------------------------
1 file changed, 14 insertions(+), 31 deletions(-)
--
2.20.1
There are two identical checks, delete one of them.
Signed-off-by: Peng Zhang <[email protected]>
Reviewed-by: Liam R. Howlett <[email protected]>
---
lib/maple_tree.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 3d894f849e57..bf64d080b376 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -4117,9 +4117,6 @@ static inline bool mas_wr_append(struct ma_wr_state *wr_mas,
if (mt_in_rcu(mas->tree))
return false;
- if (mas->offset != mas->end)
- return false;
-
end = mas->end;
if (mas->offset != end)
return false;
--
2.20.1
* Peng Zhang <[email protected]> [231120 02:09]:
> These are some small cleanups of maple tree.
>
> Just to mention, in v1, I forgot to CC LKML, but it has been added in this
> version.
>
> Changes since v1:
> - Removed the 'return' statement from [1/5].
> - Made slight modifications to the commit log of [5/5].
>
> v1: http://lists.infradead.org/pipermail/maple-tree/2023-November/003047.html
Thanks, they all look good now.
Reviewed-by: Liam R. Howlett <[email protected]>
>
> Peng Zhang (5):
> maple_tree: Move the check forward to avoid static check warning
> maple_tree: Avoid ascending when mas->min is also the parent's minimum
> maple_tree: Remove an unused parameter for ma_meta_end()
> maple_tree: Delete one of the two identical checks
> maple_tree: Simplify mas_leaf_set_meta()
>
> lib/maple_tree.c | 45 ++++++++++++++-------------------------------
> 1 file changed, 14 insertions(+), 31 deletions(-)
>
> --
> 2.20.1
>