maple_tree: re-introduce entry to mas_preallocate() arguments
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 24 Jul 2023 18:31:49 +0000 (14:31 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 18 Aug 2023 17:12:48 +0000 (10:12 -0700)
commitda0892547b101df6e13255b378380d077975368d
tree13311d48b26c96682ad2986083ac9af18bf4f354
parent53bee98d004fcd7062f2fe056720704e947e6000
maple_tree: re-introduce entry to mas_preallocate() arguments

The current preallocation strategy is to preallocate the absolute
worst-case allocation for a tree modification.  The entry (or NULL) is
needed to know how many nodes are needed to write to the tree.  Start by
adding the argument to the mas_preallocate() definition.

Link: https://lkml.kernel.org/r/20230724183157.3939892-8-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Peng Zhang <zhangpeng.00@bytedance.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/maple_tree.h
lib/maple_tree.c
mm/internal.h
mm/mmap.c
tools/testing/radix-tree/maple.c