]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
test_maple_tree: Fix test harness for new next/prev interface
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 30 Nov 2020 20:34:22 +0000 (15:34 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:33:29 +0000 (12:33 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/test_maple_tree.c

index 9d264d3cd4620f49dc4f09dbe73061c0d3c7284f..e16d305a83458b3486692bfecb010de64550b69f 100644 (file)
@@ -1080,9 +1080,12 @@ int mas_ce2_over_count(struct ma_state *mas_start, struct ma_state *mas_end,
        int count = 0, span = 0;
        unsigned long retry = 0;
        void *entry;
+       struct ma_state tmp;
+
 
        // count slots
-       entry = mas_next(mas_start, mas_end->last);
+       memcpy(&tmp, mas_start, sizeof(tmp));
+       entry = mas_next(&tmp, mas_end->last);
        while (entry) {
                BUG_ON(retry > 50); // stop infinite retry on testing.
                if (xa_is_zero(s_entry)) {
@@ -1091,7 +1094,7 @@ int mas_ce2_over_count(struct ma_state *mas_start, struct ma_state *mas_end,
                }
                count++;
                span++;
-               entry = mas_next(mas_start, mas_end->last);
+               entry = mas_next(&tmp, mas_end->last);
        }
 
        if (null_entry) {