]> www.infradead.org Git - nvme.git/commitdiff
maple_tree: change mas_adopt_children() parent usage
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 4 Aug 2023 16:59:50 +0000 (12:59 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:37:41 +0000 (13:37 -0700)
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.

Link: https://lkml.kernel.org/r/20230804165951.2661157-6-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c

index cf41e0dbb87b22cfadd50c8a265bad0a889d7683..8e94f5495a97173da91b00fcbb912b165e435f45 100644 (file)
@@ -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;