]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree: Export mas_entry_cnt to setup external mas.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 28 Sep 2020 19:45:34 +0000 (15:45 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:12:28 +0000 (15:12 -0400)
When the number of elements are know, this can pre-allocate the set
number.

include/linux/maple_tree.h

index 3b3eec60dd3ee28d02a17ea974e85c0106cac5dc..fc16e6f1a219de93ff7c7aa1fbc2cb50e4c6539f 100644 (file)
@@ -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);