]> 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>
Wed, 29 Mar 2023 22:58:38 +0000 (18:58 -0400)
commit0aeebb74bec3c8a0ddbb13ddb2b955e3804bd579
treec4d9273f15e70ba686da5519600e4ce2e072b8db
parentc8f3b2211a72ebffcc882c7c553f8e34b1fef503
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