aboutsummaryrefslogtreecommitdiffstats
path: root/lib/radix-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/radix-tree.c')
-rw-r--r--lib/radix-tree.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index be86b32bc874..4bb42a0344ec 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -81,7 +81,7 @@ struct radix_tree_preload {
81 int nr; 81 int nr;
82 struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH]; 82 struct radix_tree_node *nodes[RADIX_TREE_MAX_PATH];
83}; 83};
84DEFINE_PER_CPU(struct radix_tree_preload, radix_tree_preloads) = { 0, }; 84static DEFINE_PER_CPU(struct radix_tree_preload, radix_tree_preloads) = { 0, };
85 85
86static inline gfp_t root_gfp_mask(struct radix_tree_root *root) 86static inline gfp_t root_gfp_mask(struct radix_tree_root *root)
87{ 87{
@@ -640,13 +640,14 @@ EXPORT_SYMBOL(radix_tree_tag_get);
640 * 640 *
641 * Returns: the index of the hole if found, otherwise returns an index 641 * Returns: the index of the hole if found, otherwise returns an index
642 * outside of the set specified (in which case 'return - index >= max_scan' 642 * outside of the set specified (in which case 'return - index >= max_scan'
643 * will be true). 643 * will be true). In rare cases of index wrap-around, 0 will be returned.
644 * 644 *
645 * radix_tree_next_hole may be called under rcu_read_lock. However, like 645 * radix_tree_next_hole may be called under rcu_read_lock. However, like
646 * radix_tree_gang_lookup, this will not atomically search a snapshot of the 646 * radix_tree_gang_lookup, this will not atomically search a snapshot of
647 * tree at a single point in time. For example, if a hole is created at index 647 * the tree at a single point in time. For example, if a hole is created
648 * 5, then subsequently a hole is created at index 10, radix_tree_next_hole 648 * at index 5, then subsequently a hole is created at index 10,
649 * covering both indexes may return 10 if called under rcu_read_lock. 649 * radix_tree_next_hole covering both indexes may return 10 if called
650 * under rcu_read_lock.
650 */ 651 */
651unsigned long radix_tree_next_hole(struct radix_tree_root *root, 652unsigned long radix_tree_next_hole(struct radix_tree_root *root,
652 unsigned long index, unsigned long max_scan) 653 unsigned long index, unsigned long max_scan)