aboutsummaryrefslogtreecommitdiff
path: root/lib/radix-tree.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-17 21:33:18 +0200
committerSteven Rostedt <rostedt@goodmis.org>2011-11-14 12:11:11 -0500
commit30388f83e66ba304eeb18e1a0980ca5cafe5b6b3 (patch)
tree92489787f5f6b378aa8e9c7e59ff1aee2c6fdca3 /lib/radix-tree.c
parentecc5592cab4ce10903f9a2bdb2f4988e649d93e0 (diff)
radix-tree-rt-aware.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib/radix-tree.c')
-rw-r--r--lib/radix-tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 7ea2e033d715..205adb8fe9f5 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -166,12 +166,13 @@ radix_tree_node_alloc(struct radix_tree_root *root)
* succeed in getting a node here (and never reach
* kmem_cache_alloc)
*/
- rtp = &__get_cpu_var(radix_tree_preloads);
+ rtp = &get_cpu_var(radix_tree_preloads);
if (rtp->nr) {
ret = rtp->nodes[rtp->nr - 1];
rtp->nodes[rtp->nr - 1] = NULL;
rtp->nr--;
}
+ put_cpu_var(radix_tree_preloads);
}
if (ret == NULL)
ret = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask);
@@ -206,6 +207,7 @@ radix_tree_node_free(struct radix_tree_node *node)
call_rcu(&node->rcu_head, radix_tree_node_rcu_free);
}
+#ifndef CONFIG_PREEMPT_RT_FULL
/*
* 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
@@ -240,6 +242,7 @@ out:
return ret;
}
EXPORT_SYMBOL(radix_tree_preload);
+#endif
/*
* Return the maximum key which can be store into a