]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Clean up mas_parent_enum()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 15 Nov 2022 14:29:33 +0000 (09:29 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 13 Feb 2023 13:42:03 +0000 (08:42 -0500)
commitc2790218ac14fa9ff56078f7bbc4a4b4982d051d
tree75dadf72da9042a14ec264f6f1c042891cc2e047
parentf7c3ded1fad97744884e7fbdabe3e0c2b0ec7698
maple_tree: Clean up mas_parent_enum()

mas_parent_enum() is a simple wrapper for mte_parent_enum() which is
only called from that wrapper.  Remove the wrapper and inline
mte_parent_enum() into mas_parent_enum().

At the same time, clean up the bit masking of the root pointer since it
cannot be set by the time the bit masking occurs.  Change the check on
the root bit to a WARN_ON(), and fix the verification code to not
trigger the WARN_ON() before checking if the node is root.

Reported-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c