aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/maple.c
diff options
context:
space:
mode:
authorLiam R. Howlett <[email protected]>2023-07-12 17:39:16 +0000
committerAndrew Morton <[email protected]>2023-07-17 19:53:22 +0000
commitef5c3de5211b5a3a8102b25aa83eb4cde65ac2fd (patch)
treebf9884fc8d888592a13854533b26dae5f020430b /tools/testing/radix-tree/maple.c
parentmaple_tree: fix 32 bit mas_next testing (diff)
downloadkernel-ef5c3de5211b5a3a8102b25aa83eb4cde65ac2fd.tar.gz
kernel-ef5c3de5211b5a3a8102b25aa83eb4cde65ac2fd.zip
maple_tree: fix node allocation testing on 32 bit
Internal node counting was altered and the 64 bit test was updated, however the 32bit test was missed. Restore the 32bit test to a functional state. Link: https://lore.kernel.org/linux-mm/CAMuHMdV4T53fOw7VPoBgPR7fP6RYqf=CBhD_y_vOg53zZX_DnA@mail.gmail.com/ Link: https://lkml.kernel.org/r/[email protected] Fixes: 541e06b772c1 ("maple_tree: remove GFP_ZERO from kmem_cache_alloc() and kmem_cache_alloc_bulk()") Signed-off-by: Liam R. Howlett <[email protected]> Cc: <[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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c
index 03539d86cdf0..75ea2081a317 100644
--- a/tools/testing/radix-tree/maple.c
+++ b/tools/testing/radix-tree/maple.c
@@ -206,9 +206,9 @@ static noinline void __init check_new_node(struct maple_tree *mt)
e = i - 1;
} else {
if (i >= 4)
- e = i - 4;
- else if (i == 3)
- e = i - 2;
+ e = i - 3;
+ else if (i >= 1)
+ e = i - 1;
else
e = 0;
}