diff options
Diffstat (limited to 'lib/radix-tree.c')
-rw-r--r-- | lib/radix-tree.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 14130ab197c0..66c71312c381 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -82,7 +82,7 @@ static struct kmem_cache *radix_tree_node_cachep; | |||
82 | */ | 82 | */ |
83 | struct radix_tree_preload { | 83 | struct radix_tree_preload { |
84 | unsigned nr; | 84 | unsigned nr; |
85 | /* nodes->private_data points to next preallocated node */ | 85 | /* nodes->parent points to next preallocated node */ |
86 | struct radix_tree_node *nodes; | 86 | struct radix_tree_node *nodes; |
87 | }; | 87 | }; |
88 | static DEFINE_PER_CPU(struct radix_tree_preload, radix_tree_preloads) = { 0, }; | 88 | static DEFINE_PER_CPU(struct radix_tree_preload, radix_tree_preloads) = { 0, }; |
@@ -405,8 +405,7 @@ radix_tree_node_alloc(gfp_t gfp_mask, struct radix_tree_node *parent, | |||
405 | rtp = this_cpu_ptr(&radix_tree_preloads); | 405 | rtp = this_cpu_ptr(&radix_tree_preloads); |
406 | if (rtp->nr) { | 406 | if (rtp->nr) { |
407 | ret = rtp->nodes; | 407 | ret = rtp->nodes; |
408 | rtp->nodes = ret->private_data; | 408 | rtp->nodes = ret->parent; |
409 | ret->private_data = NULL; | ||
410 | rtp->nr--; | 409 | rtp->nr--; |
411 | } | 410 | } |
412 | /* | 411 | /* |
@@ -483,7 +482,7 @@ static int __radix_tree_preload(gfp_t gfp_mask, unsigned nr) | |||
483 | preempt_disable(); | 482 | preempt_disable(); |
484 | rtp = this_cpu_ptr(&radix_tree_preloads); | 483 | rtp = this_cpu_ptr(&radix_tree_preloads); |
485 | if (rtp->nr < nr) { | 484 | if (rtp->nr < nr) { |
486 | node->private_data = rtp->nodes; | 485 | node->parent = rtp->nodes; |
487 | rtp->nodes = node; | 486 | rtp->nodes = node; |
488 | rtp->nr++; | 487 | rtp->nr++; |
489 | } else { | 488 | } else { |
@@ -2260,7 +2259,7 @@ static int radix_tree_cpu_dead(unsigned int cpu) | |||
2260 | rtp = &per_cpu(radix_tree_preloads, cpu); | 2259 | rtp = &per_cpu(radix_tree_preloads, cpu); |
2261 | while (rtp->nr) { | 2260 | while (rtp->nr) { |
2262 | node = rtp->nodes; | 2261 | node = rtp->nodes; |
2263 | rtp->nodes = node->private_data; | 2262 | rtp->nodes = node->parent; |
2264 | kmem_cache_free(radix_tree_node_cachep, node); | 2263 | kmem_cache_free(radix_tree_node_cachep, node); |
2265 | rtp->nr--; | 2264 | rtp->nr--; |
2266 | } | 2265 | } |