aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2014-06-04 19:07:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:03 -0400
commit7c8e0181e6e0b8079c4c2ce902bf52d7a2c6fa5d (patch)
treefe5aee0e426d8f0528856bb0decb95636ff3e8a0 /lib
parentdc6f6c97f1d3d58fef81f0f9db0c7d068b2cf392 (diff)
mm: replace __get_cpu_var uses with this_cpu_ptr
Replace places where __get_cpu_var() is used for an address calculation with this_cpu_ptr(). Signed-off-by: Christoph Lameter <cl@linux.com> Cc: Tejun Heo <tj@kernel.org> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/radix-tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 9599aa72d7a0..55f7a9c27312 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -194,7 +194,7 @@ radix_tree_node_alloc(struct radix_tree_root *root)
194 * succeed in getting a node here (and never reach 194 * succeed in getting a node here (and never reach
195 * kmem_cache_alloc) 195 * kmem_cache_alloc)
196 */ 196 */
197 rtp = &__get_cpu_var(radix_tree_preloads); 197 rtp = this_cpu_ptr(&radix_tree_preloads);
198 if (rtp->nr) { 198 if (rtp->nr) {
199 ret = rtp->nodes[rtp->nr - 1]; 199 ret = rtp->nodes[rtp->nr - 1];
200 rtp->nodes[rtp->nr - 1] = NULL; 200 rtp->nodes[rtp->nr - 1] = NULL;
@@ -250,14 +250,14 @@ static int __radix_tree_preload(gfp_t gfp_mask)
250 int ret = -ENOMEM; 250 int ret = -ENOMEM;
251 251
252 preempt_disable(); 252 preempt_disable();
253 rtp = &__get_cpu_var(radix_tree_preloads); 253 rtp = this_cpu_ptr(&radix_tree_preloads);
254 while (rtp->nr < ARRAY_SIZE(rtp->nodes)) { 254 while (rtp->nr < ARRAY_SIZE(rtp->nodes)) {
255 preempt_enable(); 255 preempt_enable();
256 node = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask); 256 node = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask);
257 if (node == NULL) 257 if (node == NULL)
258 goto out; 258 goto out;
259 preempt_disable(); 259 preempt_disable();
260 rtp = &__get_cpu_var(radix_tree_preloads); 260 rtp = this_cpu_ptr(&radix_tree_preloads);
261 if (rtp->nr < ARRAY_SIZE(rtp->nodes)) 261 if (rtp->nr < ARRAY_SIZE(rtp->nodes))
262 rtp->nodes[rtp->nr++] = node; 262 rtp->nodes[rtp->nr++] = node;
263 else 263 else