From: Matthew Wilcox Date: Sat, 1 Dec 2018 15:11:55 +0000 (-0500) Subject: maple_tree: Handle ZERO entry in mt_dump() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=406555dcd189feea7eb8a7d530b522d000590af3;p=users%2Fjedix%2Flinux-maple.git maple_tree: Handle ZERO entry in mt_dump() 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 --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index b79c39645baf..5dff567d949f 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -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);