summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam R. Howlett (Oracle) <liam@infradead.org>2026-08-21 15:26:16 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-08-24 18:43:29 -0700
commit4bd59d5bc2c8f3e7e1bd62f3a5029471a6b531bb (patch)
tree58947d933c99dc463aa2407150f35be43383fde2
parent7d1e34352727cf1073eccbacd13fac075defc7a4 (diff)
downloadlinux-next-4bd59d5bc2c8f3e7e1bd62f3a5029471a6b531bb.tar.gz
linux-next-4bd59d5bc2c8f3e7e1bd62f3a5029471a6b531bb.zip
maple_tree: use prefetched value in mas_wr_store_type()
The slot contents exist in wr_mas->content, which has less overhead than reading the slot again. Link: https://lore.kernel.org/20260821192627.4085470-9-liam@infradead.org Signed-off-by: Liam R. Howlett (Oracle) <liam@infradead.org> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Breno Leitao <leitao@debian.org> Cc: Chris Mason <clm@meta.com> Cc: Chuck Lever <cel@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Joe Perches <joe@perches.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@surriel.com> Cc: Waiman Long <longman@redhat.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--lib/maple_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index baaaa128594c..d5fa85bc7aab 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -3280,7 +3280,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) {