]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: print empty for an empty tree on mt_dump()
authorWei Yang <richard.weiyang@gmail.com>
Thu, 31 Oct 2024 23:16:23 +0000 (23:16 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:35 +0000 (21:29 -0700)
commit1a15baea747c22424b1df87288ce1ed501e00841
treeb73ad3b745ebcc1047450c661bfba82d4e2b7c19
parent856fff52c5e54a25e24b7635dbc89eb57642dab9
maple_tree: print empty for an empty tree on mt_dump()

Patch series "refine storing null", v5.

When overwriting the whole range with NULL, current behavior is not
correct.

This patch (of 5):

Currently for an empty tree, it would print:

  maple_tree(0x7ffcd02c6ee0) flags 1, height 0 root (nil)
  0: (nil)

This is a little misleading.

Let's print (empty) for an empty tree.

Link: https://lkml.kernel.org/r/20241031231627.14316-1-richard.weiyang@gmail.com
Link: https://lkml.kernel.org/r/20241031231627.14316-2-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c