From 52d46e128ae8545d8cd09de711d46cd183c44868 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Thu, 18 Oct 2018 15:39:00 -0400 Subject: [PATCH] radix tree: Remove preload API With all callers gone, we can remove the radix_tree_preload API. The mechanism remains in order to support the IDR preload API. Signed-off-by: Matthew Wilcox --- include/linux/radix-tree.h | 6 ------ lib/radix-tree.c | 17 ----------------- 2 files changed, 23 deletions(-) diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 3d825c348a7b..e9eab4c9df96 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h @@ -223,7 +223,6 @@ void *radix_tree_delete(struct radix_tree_root *, unsigned long); unsigned int radix_tree_gang_lookup(const struct radix_tree_root *, void **results, unsigned long first_index, unsigned int max_items); -int radix_tree_preload(gfp_t gfp_mask); void radix_tree_init(void); void *radix_tree_tag_set(struct radix_tree_root *, unsigned long index, unsigned int tag); @@ -238,11 +237,6 @@ unsigned int radix_tree_gang_lookup_tag(const struct radix_tree_root *, unsigned int max_items, unsigned int tag); int radix_tree_tagged(const struct radix_tree_root *, unsigned int tag); -static inline void radix_tree_preload_end(void) -{ - preempt_enable(); -} - void __rcu **idr_get_free(struct radix_tree_root *root, struct radix_tree_iter *iter, gfp_t gfp, unsigned long max); diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 4cc27ae8344c..99869dd4acc8 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -362,23 +362,6 @@ out: return ret; } -/* - * Load up this CPU's radix_tree_node buffer with sufficient objects to - * ensure that the addition of a single element in the tree cannot fail. On - * success, return zero, with preemption disabled. On error, return -ENOMEM - * with preemption not disabled. - * - * To make use of this facility, the radix tree must be initialised without - * __GFP_DIRECT_RECLAIM being passed to INIT_RADIX_TREE(). - */ -int radix_tree_preload(gfp_t gfp_mask) -{ - /* Warn on non-sensical use... */ - WARN_ON_ONCE(!gfpflags_allow_blocking(gfp_mask)); - return __radix_tree_preload(gfp_mask, RADIX_TREE_PRELOAD_SIZE); -} -EXPORT_SYMBOL(radix_tree_preload); - static unsigned radix_tree_load_root(const struct radix_tree_root *root, struct radix_tree_node **nodep, unsigned long *maxindex) { -- 2.50.1