]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Fix mas_expected_entries() off by one
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 22 Jul 2022 15:49:49 +0000 (11:49 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 22 Jul 2022 19:09:46 +0000 (15:09 -0400)
commitad3de87eb8e71557d8ea8c5c437c94425a6ad999
tree59f173210ca797c92fb22983ab1bd222545ac61d
parent649c2ab3e9bed3803a3a225bca0afe42b763b699
maple_tree: Fix mas_expected_entries() off by one

When inserting nodes, a final call to split the nodes will require a new
parent.  Add this as the working area for mas_expected_entries().

Add a maple state flag which will WARN_ON() if there is insufficient
nodes allocated.

Export mas_is_err() to be used in checking mas_store() returns
externally.

Fixes: 06b152b7980a (Maple Tree: add new data structure)
Reported-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
include/linux/maple_tree.h
lib/maple_tree.c