[5/6] maple_tree: Change mas_adopt_children() parent usage

Message ID 20230804165951.2661157-6-Liam.Howlett@oracle.com
State New
Headers
Series maple_tree: Change replacement strategy |

Commit Message

Liam R. Howlett Aug. 4, 2023, 4:59 p.m. UTC
  All calls to mas_adopt_children() currently pass the parent as the node
in the maple state.  Allow for the parent pointer that is passed in to
be used instead.

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

Patch

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index cf41e0dbb87b..8e94f5495a97 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -1702,7 +1702,7 @@  static inline void mas_adopt_children(struct ma_state *mas,
 		struct maple_enode *parent)
 {
 	enum maple_type type = mte_node_type(parent);
-	struct maple_node *node = mas_mn(mas);
+	struct maple_node *node = mte_to_node(parent);
 	void __rcu **slots = ma_slots(node, type);
 	unsigned long *pivots = ma_pivots(node, type);
 	struct maple_enode *child;