Commit d39f5650 authored by Andrew Morton's avatar Andrew Morton Committed by Peng Zhang
Browse files

lib/maple_tree.c: fix build error due to hotfix alteration

mainline inclusion
from mainline-v6.8-rc1
commit 5143eecd2af2b5424f7b96d53f17bb4718e46bd3
category: performance
bugzilla: https://gitee.com/openeuler/kernel/issues/I9EHBO
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5143eecd2af2b5424f7b96d53f17bb4718e46bd3



--------------------------------

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarZhangPeng <zhangpeng362@huawei.com>
parent d3795dc9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5524,7 +5524,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;