aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yang <[email protected]>2024-08-26 01:24:21 +0000
committerAndrew Morton <[email protected]>2024-09-09 16:39:01 -0700
commit81528310698726e8f79b9c3de01ebe02567119dd (patch)
tree4362c97a1e78e9ae54e7e3cf479499ce30bf25ae
parente9c0bfd704e360eb151ca2d65229fbe425c563e7 (diff)
maple_tree: arange64 node is not a leaf node
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/[email protected] Signed-off-by: Wei Yang <[email protected]> Reviewed-by: Liam R. Howlett <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--lib/maple_tree.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 755ba8b18e14..f7a971c462eb 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -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);