]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: have mas_store() allocate nodes if needed
authorSidhartha Kumar <sidhartha.kumar@oracle.com>
Thu, 18 Jan 2024 20:46:57 +0000 (12:46 -0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Sat, 20 Apr 2024 01:40:09 +0000 (21:40 -0400)
commit7179d43147bcbdd36fe51894776169ede1159c06
treed8ba00a713cc648d0cf7d4e9076a72719229a043
parenta70a6f55c1977ebfb29db9b97a7c57b894069e37
maple_tree: have mas_store() allocate nodes if needed

Not all users of mas_store() enter with nodes already preallocated.
Check for the MA_STATE_PREALLOC flag to decide whether to preallocate nodes
within mas_store() rather than relying on future write helper functions
to perform the allocations. This allows the write helper functions to be
simplified as they do not have to do checks to make sure there are
enough allocated nodes to perform the write.

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
lib/maple_tree.c