From: Liam R. Howlett Date: Mon, 28 Sep 2020 19:45:34 +0000 (-0400) Subject: maple_tree: Export mas_entry_cnt to setup external mas. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=398c51496a6d6364c301d9d32f709a65474482b4;p=users%2Fjedix%2Flinux-maple.git maple_tree: Export mas_entry_cnt to setup external mas. When the number of elements are know, this can pre-allocate the set number. --- 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);