]> 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, 28 Nov 2022 20:12:00 +0000 (15:12 -0500)
commit80bfbbf9426f9da5e2d20230e5ef1ae86c4d5b0f
treeedbbfe8cb1caa91a99ffec889ce148f5a8c054bc
parent2fd37e639ab03c2a5c0cf7a9d291cd97f639f78f
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