]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mas_start() changes
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Tue, 12 Oct 2021 15:37:20 +0000 (11:37 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Oct 2021 19:23:10 +0000 (15:23 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c

index 27058c6b63b3d8c9d21b7f60a59685e454db66ae..580ef50244221ce68e46e16f54ba30fae386f7b2 100644 (file)
@@ -1290,14 +1290,14 @@ static inline struct maple_enode *mas_start(struct ma_state *mas)
                mas->depth = 0;
                mas->offset = 0;
 
+               root = mas_root(mas);
                /* empty tree */
-               if (unlikely(!mas_root(mas)))
+               if (unlikely(!root))
                        goto done;
 
-               root = mte_safe_root(mas_root(mas));
 
-               if (likely(xa_is_node(mas_root(mas)))) {
-                       mas->node = root;
+               if (likely(xa_is_node(root))) {
+                       mas->node = mte_safe_root(root);
                } else {
                        /* Single entry tree. */
                        if (mas->index > 0)