diff options
Diffstat (limited to 'lib/radix-tree.c')
-rw-r--r-- | lib/radix-tree.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 92cdd9936e3d..bc1e61b49046 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -157,12 +157,14 @@ radix_tree_node_alloc(struct radix_tree_root *root) | |||
157 | * succeed in getting a node here (and never reach | 157 | * succeed in getting a node here (and never reach |
158 | * kmem_cache_alloc) | 158 | * kmem_cache_alloc) |
159 | */ | 159 | */ |
160 | rtp = &get_cpu_var(radix_tree_preloads); | ||
160 | rtp = &__get_cpu_var(radix_tree_preloads); | 161 | rtp = &__get_cpu_var(radix_tree_preloads); |
161 | if (rtp->nr) { | 162 | if (rtp->nr) { |
162 | ret = rtp->nodes[rtp->nr - 1]; | 163 | ret = rtp->nodes[rtp->nr - 1]; |
163 | rtp->nodes[rtp->nr - 1] = NULL; | 164 | rtp->nodes[rtp->nr - 1] = NULL; |
164 | rtp->nr--; | 165 | rtp->nr--; |
165 | } | 166 | } |
167 | put_cpu_var(radix_tree_preloads); | ||
166 | } | 168 | } |
167 | if (ret == NULL) | 169 | if (ret == NULL) |
168 | ret = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask); | 170 | ret = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask); |
@@ -195,6 +197,8 @@ radix_tree_node_free(struct radix_tree_node *node) | |||
195 | call_rcu(&node->rcu_head, radix_tree_node_rcu_free); | 197 | call_rcu(&node->rcu_head, radix_tree_node_rcu_free); |
196 | } | 198 | } |
197 | 199 | ||
200 | #ifndef CONFIG_PREEMPT_RT | ||
201 | |||
198 | /* | 202 | /* |
199 | * Load up this CPU's radix_tree_node buffer with sufficient objects to | 203 | * Load up this CPU's radix_tree_node buffer with sufficient objects to |
200 | * ensure that the addition of a single element in the tree cannot fail. On | 204 | * ensure that the addition of a single element in the tree cannot fail. On |
@@ -230,6 +234,8 @@ out: | |||
230 | } | 234 | } |
231 | EXPORT_SYMBOL(radix_tree_preload); | 235 | EXPORT_SYMBOL(radix_tree_preload); |
232 | 236 | ||
237 | #endif | ||
238 | |||
233 | /* | 239 | /* |
234 | * Return the maximum key which can be store into a | 240 | * Return the maximum key which can be store into a |
235 | * radix tree with height HEIGHT. | 241 | * radix tree with height HEIGHT. |