summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@Oracle.com>2023-04-11 18:10:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-13 17:55:39 +0300
commitd3af5f8a50dd75f4d071e00c16d9ac3f0ae3858f (patch)
tree0105be80ef0ec586541a27763156480ad98f356e /lib
parentcc2f2507f3f05612c61c4b8f11bb91efbb9ad495 (diff)
downloadlinux-d3af5f8a50dd75f4d071e00c16d9ac3f0ae3858f.tar.xz
maple_tree: remove extra smp_wmb() from mas_dead_leaves()
commit 8372f4d83f96f35915106093cde4565836587123 upstream. 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. Link: https://lkml.kernel.org/r/20230227173632.3292573-5-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Cc: stable@vger.kernel.org Signed-off-by: Liam Howlett <Liam.Howlett@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/maple_tree.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 7f451e0c6fba..f7c204904b8f 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -5495,7 +5495,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);
}