[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250407231354.11771-3-richard.weiyang@gmail.com>
Date: Mon, 7 Apr 2025 23:13:53 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: Liam.Howlett@...cle.com,
akpm@...ux-foundation.org,
willy@...radead.org
Cc: linux-kernel@...r.kernel.org,
maple-tree@...ts.infradead.org,
linux-mm@...ck.org,
Wei Yang <richard.weiyang@...il.com>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
stable@...r.kernel.org
Subject: [RESEND Patch v2 2/3] maple_tree: restart walk on correct status
Commit a8091f039c1e ("maple_tree: add MAS_UNDERFLOW and MAS_OVERFLOW
states") adds more status during maple tree walk. But it introduce a
typo on the status check during walk.
It expects to mean neither active nor start, we would restart the walk,
while current code means we would always restart the walk.
Fixes: a8091f039c1e ("maple_tree: add MAS_UNDERFLOW and MAS_OVERFLOW states")
Signed-off-by: Wei Yang <richard.weiyang@...il.com>
CC: Liam R. Howlett <Liam.Howlett@...cle.com>
CC: <stable@...r.kernel.org>
Reviewed-by: Liam R. Howlett <Liam.Howlett@...cle.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 0696e8d1c4e9..81970b3a6af7 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -4895,7 +4895,7 @@ void *mas_walk(struct ma_state *mas)
{
void *entry;
- if (!mas_is_active(mas) || !mas_is_start(mas))
+ if (!mas_is_active(mas) && !mas_is_start(mas))
mas->status = ma_start;
retry:
entry = mas_state_walk(mas);
--
2.34.1
Powered by blists - more mailing lists