]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Add mas_get_unmapped_area and mas_get_unmapped_area_rev
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 26 Nov 2019 18:54:29 +0000 (13:54 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 5 Jan 2021 17:28:16 +0000 (12:28 -0500)
commit02c0fcef1eedae477819b10ac50a379649636f97
tree407df86dc439b154fc6d9ea5ad9367e5c5219016
parent767a8a84913a97bbb798b28dbcc3b1d9dc9e19e5
maple_tree: Add mas_get_unmapped_area and mas_get_unmapped_area_rev

This adds an interface which was missing for the drop-in replacement for
the mmap code.

It also fixes two issues:

1. Range checking for the upper bounds during a forward allocation walk
in _awalk
2. Checking if the ma_state is in error state during the loop in awalk
prior to calling _awalk.  The order was incorrect and could have caused
issues.

I've exposed mas_prev, and mtree_store_range for the mmap code in this
commit as well.

I've renamed a few missed ma_state functions to mas_ instead of ma_.
I've also reorder the header a bit.

Along with the new mas_get_unmapped_area{_rev}, I've added testcases for
them.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
include/linux/maple_tree.h
lib/maple_tree.c
lib/test_maple_tree.c