]> 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>
Fri, 30 Oct 2020 18:56:43 +0000 (14:56 -0400)
commit4ee38597e9263fc931ac50f87958ac4382907834
treebb28fcf7a2b208f1bc9c980e91930fcad9fde9e8
parentd07d6cd3d755ef51c9735bf220c5c32e7326c8fb
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