From 5152f95ab7e04c912d78620e777f4cb4266241d9 Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Mon, 28 Sep 2020 15:45:34 -0400 Subject: [PATCH] maple_tree: Export mas_entry_cnt to setup external mas. When the number of elements are know, this can pre-allocate the set number. --- include/linux/maple_tree.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h index 3b3eec60dd3e..fc16e6f1a219 100644 --- a/include/linux/maple_tree.h +++ b/include/linux/maple_tree.h @@ -395,6 +395,8 @@ static inline void mt_set_in_rcu(struct maple_tree *mt) mtree_unlock(mt); } +int mas_entry_cnt(struct ma_state *mas, unsigned long nr_leaves); + void *mt_find(struct maple_tree *mt, unsigned long *index, unsigned long max); void *_mt_find(struct maple_tree *mt, unsigned long *index, unsigned long max, bool start); -- 2.50.1