]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: remove extra smp_wmb() from mas_dead_leaves()
authorLiam Howlett <Liam.Howlett@oracle.com>
Thu, 24 Nov 2022 15:55:31 +0000 (10:55 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 4 Jan 2023 20:56:10 +0000 (15:56 -0500)
The call to mte_set_dead_node() before the smp_wmb() already calls
smp_wmb() so this is not needed.  This is an optimization for the RCU
mode of the maple tree.

Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Liam Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index e430f7c73f735dabd132b578244c7ab2221d861d..7673d6ecf3e270457af3ae2083c36a163fa794ec 100644 (file)
@@ -5505,7 +5505,6 @@ unsigned char mas_dead_leaves(struct ma_state *mas, void __rcu **slots,
                        break;
 
                mte_set_node_dead(entry);
-               smp_wmb(); /* Needed for RCU */
                node->type = type;
                rcu_assign_pointer(slots[offset], node);
        }