lib/maple_tree.c: fix build error due to hotfix alteration
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 13 Dec 2023 20:59:49 +0000 (12:59 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Dec 2023 22:48:11 +0000 (14:48 -0800)
Commit 0de56e38b307 ("maple_tree: use maple state end for write
operations") was broken by a later patch "maple_tree: do not preallocate
nodes for slot stores".  But the later patch was scheduled ahead of
0de56e38b307, for 6.7-rc.

This fixlet undoes the damage.

Fixes: 0de56e38b307 ("maple_tree: use maple state end for write operations")
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c

index d30815cbab8089f8c4af25abee8913da0a16f8a1..4a69148963e0cc94b61ab82f2ce9504643ffe6fc 100644 (file)
@@ -5477,7 +5477,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp)
        node_size = mas_wr_new_end(&wr_mas);
 
        /* Slot store, does not require additional nodes */
-       if (node_size == wr_mas.node_end) {
+       if (node_size == mas->end) {
                /* reuse node */
                if (!mt_in_rcu(mas->tree))
                        return 0;