diff options
| author | Christoph Lameter <cl@linux.com> | 2014-06-04 16:07:56 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 20:20:25 +0200 |
| commit | a9fc44c66e12124db901c34e83620d26654b7e9a (patch) | |
| tree | c1cd7f9d8751d730168550f5f00a53ac6c7a6591 /lib | |
| parent | 79b8b99415975bed29ac702184e9a3924c0ca8d1 (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>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/radix-tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index e7964296f..d5b7a0fcc 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -215,7 +215,7 @@ 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 = this_cpu_ptr(&radix_tree_preloads); if (rtp->nr) { ret = rtp->nodes[rtp->nr - 1]; rtp->nodes[rtp->nr - 1] = NULL; @@ -271,14 +271,14 @@ int radix_tree_preload(gfp_t gfp_mask) int ret = -ENOMEM; preempt_disable(); - rtp = &__get_cpu_var(radix_tree_preloads); + rtp = this_cpu_ptr(&radix_tree_preloads); while (rtp->nr < ARRAY_SIZE(rtp->nodes)) { preempt_enable(); node = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask); if (node == NULL) goto out; preempt_disable(); - rtp = &__get_cpu_var(radix_tree_preloads); + rtp = this_cpu_ptr(&radix_tree_preloads); if (rtp->nr < ARRAY_SIZE(rtp->nodes)) rtp->nodes[rtp->nr++] = node; else |
