]> www.infradead.org Git - users/willy/xarray.git/commitdiff
maple_tree: arange64 node is not a leaf node
authorWei Yang <richard.weiyang@gmail.com>
Mon, 26 Aug 2024 01:24:21 +0000 (01:24 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 9 Sep 2024 23:39:01 +0000 (16:39 -0700)
mt_dump_arange64() only applies to an entry whose type is maple_arange_64,
in which mte_is_leaf() must return false.

Since mte_is_leaf() here is always false, we can remove this condition
check.

Link: https://lkml.kernel.org/r/20240826012422.29935-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c

index 755ba8b18e1494d0499deeb6e5b4c16f0eab5292..f7a971c462eb8eddc9e0c9d1f718b0fdca6a3e11 100644 (file)
@@ -7203,7 +7203,6 @@ static void mt_dump_arange64(const struct maple_tree *mt, void *entry,
        enum mt_dump_format format)
 {
        struct maple_arange_64 *node = &mte_to_node(entry)->ma64;
-       bool leaf = mte_is_leaf(entry);
        unsigned long first = min;
        int i;
 
@@ -7237,10 +7236,7 @@ static void mt_dump_arange64(const struct maple_tree *mt, void *entry,
                        break;
                if (last == 0 && i > 0)
                        break;
-               if (leaf)
-                       mt_dump_entry(mt_slot(mt, node->slot, i),
-                                       first, last, depth + 1, format);
-               else if (node->slot[i])
+               if (node->slot[i])
                        mt_dump_node(mt, mt_slot(mt, node->slot, i),
                                        first, last, depth + 1, format);