]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: separate ma_state node from status.
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 1 Nov 2023 17:16:25 +0000 (13:16 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Nov 2023 21:16:22 +0000 (13:16 -0800)
commit022d4e86bb1749709019f04aad9b357bcdec2c1c
tree67eceb27f024dcf40f76505a8cd5f788132c95e6
parente5f2bc97476e803b49c98d49a26609330df3fdde
maple_tree: separate ma_state node from status.

The maple tree node is overloaded to keep status as well as the active
node.  This, unfortunately, results in a re-walk on underflow or overflow.
Since the maple state has room, the status can be placed in its own enum
in the structure.  Once an underflow/overflow is detected, certain modes
can restore the status to active and others may need to re-walk just that
one node to see the entry.

The status being an enum has the benefit of detecting unhandled status in
switch statements.

Link: https://lkml.kernel.org/r/20231101171629.3612299-9-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Peng Zhang <zhangpeng.00@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/maple_tree.h
include/linux/mm_types.h
lib/maple_tree.c
lib/test_maple_tree.c
mm/internal.h
tools/testing/radix-tree/maple.c