]> 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 15:49:49 +0000 (11:49 -0400)
commitdd1bc3f7f93e26b7c0e1b4e231a0d5e3b149df3c
tree8ba2c6aaf0391cc7c87eb85456c85ac95e337157
parent4081601f3dffc83feb681c5447ac360fc5204cd7
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