maple_tree: Handle ZERO entry in mt_dump()
authorMatthew Wilcox <willy@infradead.org>
Sat, 1 Dec 2018 15:11:55 +0000 (10:11 -0500)
committerMatthew Wilcox <willy@infradead.org>
Sat, 1 Dec 2018 15:23:18 +0000 (10:23 -0500)
If there is a single ZERO entry in mt->root, this should be printed
as 0-0, not 0-ULONG_MAX.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
lib/maple_tree.c

index b79c39645baf5b6b81c144f3f85cb9e4726b2c7d..5dff567d949f022cd8c25589e496054341c2b9a1 100644 (file)
@@ -668,8 +668,7 @@ void mt_dump(const struct maple_tree *mt)
        unsigned long min = 0;
        unsigned long max = ULONG_MAX;
 
-
-       if (xa_is_internal(entry) == false)
+       if (!xa_is_node(entry))
                max = 0;
        pr_info("maple_tree(%p) flags %X, root %p, min %lu, max %lu\n",
                 mt, mt->flags, entry, min, max);