[PATCH] maple_tree: Fix bitwise for logical operator in mas_validate_limits()

Liam Howlett liam.howlett at oracle.com
Tue Jul 19 11:51:57 PDT 2022


Use the correct operator.

Fixes: fb7297e8a66b (Maple Tree: add new data structure)
Signed-off-by: Liam R. Howlett <Liam.Howlett at oracle.com>
---
 lib/maple_tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 0c0bda979693..d5b310e73068 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -6966,7 +6966,7 @@ static void mas_validate_limits(struct ma_state *mas)
 
 		piv = mas_safe_pivot(mas, pivots, i, type);
 
-		if (!piv & (i != 0))
+		if (!piv && (i != 0))
 			break;
 
 		if (!mte_is_leaf(mas->node)) {
-- 
2.35.1



More information about the maple-tree mailing list