aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/maple.c
diff options
context:
space:
mode:
authorLiam R. Howlett <[email protected]>2023-11-01 17:16:26 +0000
committerAndrew Morton <[email protected]>2023-12-12 18:56:58 +0000
commit9a40d45c1f2c49273c04938ec3d7849f685eb3c1 (patch)
tree6f0b80f258d7519230a7507dc06f7cd95f9de12a /tools/testing/radix-tree/maple.c
parentmaple_tree: separate ma_state node from status (diff)
downloadkernel-9a40d45c1f2c49273c04938ec3d7849f685eb3c1.tar.gz
kernel-9a40d45c1f2c49273c04938ec3d7849f685eb3c1.zip
maple_tree: remove mas_searchable()
Now that the status of the maple state is outside of the node, the mas_searchable() function can be dropped for easier open-coding of what is going on. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Liam R. Howlett <[email protected]> Cc: Peng Zhang <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/testing/radix-tree/maple.c')
-rw-r--r--tools/testing/radix-tree/maple.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c
index 857c439e6bbc..56ae47291ee0 100644
--- a/tools/testing/radix-tree/maple.c
+++ b/tools/testing/radix-tree/maple.c
@@ -974,8 +974,10 @@ retry:
if (likely(mas->offset != MAPLE_NODE_SLOTS))
entry = mas_get_slot(mas, mas->offset);
- if (mas_dead_node(mas, index))
+ if (mas_is_active(mas) && mte_dead_node(mas->node)) {
+ mas_set(mas, index);
goto retry;
+ }
return entry;
}