Skip to content

Commit 8372f4d

Browse files
howlettakpm00
authored andcommitted
maple_tree: remove extra smp_wmb() from mas_dead_leaves()
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/[email protected] Fixes: 54a611b ("Maple Tree: add new data structure") Signed-off-by: Liam Howlett <[email protected]> Signed-off-by: Suren Baghdasaryan <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 2e5b492 commit 8372f4d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/maple_tree.c

-1
Original file line numberDiff line numberDiff line change
@@ -5503,7 +5503,6 @@ unsigned char mas_dead_leaves(struct ma_state *mas, void __rcu **slots,
55035503
break;
55045504

55055505
mte_set_node_dead(entry);
5506-
smp_wmb(); /* Needed for RCU */
55075506
node->type = type;
55085507
rcu_assign_pointer(slots[offset], node);
55095508
}

0 commit comments

Comments
 (0)