]> www.infradead.org Git - users/willy/xarray.git/commitdiff
radix tree: Remove preload API
authorMatthew Wilcox <willy@infradead.org>
Thu, 18 Oct 2018 19:39:00 +0000 (15:39 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 8 Aug 2019 18:01:05 +0000 (14:01 -0400)
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 <willy@infradead.org>
include/linux/radix-tree.h
lib/radix-tree.c

index 3d825c348a7b85f9e479d2f8dce0360e15e7250f..e9eab4c9df968c9ae67f691fdd4e0a4b1c61bceb 100644 (file)
@@ -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);
index 4cc27ae8344c774ab712e041d4b48e812910cb62..99869dd4acc8de057d57dcd3bb4a9595efc055fd 100644 (file)
@@ -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)
 {