[PATCH 08/18] maple_tree: Use prefetched value in mas_wr_store_type()

From: Liam R. Howlett (Oracle)

Date: Mon Jun 29 2026 - 11:01:26 EST


The slot contents exist in wr_mas->content, which has less overhead than
reading the slot again.

Signed-off-by: Liam R. Howlett (Oracle) <liam@xxxxxxxxxxxxx>
---
lib/maple_tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 8106eb8bf2eb6..fe10ff83e4937 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -3276,7 +3276,7 @@ static inline void mas_wr_slot_store(struct ma_wr_state *wr_mas)
void __rcu **slots = wr_mas->slots;
bool gap = false;

- gap |= !mt_slot_locked(mas->tree, slots, offset);
+ gap |= !wr_mas->content;
gap |= !mt_slot_locked(mas->tree, slots, offset + 1);

if (wr_mas->offset_end - offset == 1) {
--
2.47.3