From: Andrew Morton Date: Wed, 13 Dec 2023 20:59:49 +0000 (-0800) Subject: lib/maple_tree.c: fix build error due to hotfix alteration X-Git-Tag: v6.8-rc1~180^2~207 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5143eecd2af2b5424f7b96d53f17bb4718e46bd3;p=thirdparty%2Fkernel%2Flinux.git lib/maple_tree.c: fix build error due to hotfix alteration 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 Cc: Sidhartha Kumar Signed-off-by: Andrew Morton --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index d30815cbab808..4a69148963e0c 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -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;