aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rcutree.c6
-rw-r--r--kernel/rcutree.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 00c518fa34bb..1e552598b55d 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -157,7 +157,6 @@ unsigned long rcutorture_vernum;
157 157
158/* State information for rcu_barrier() and friends. */ 158/* State information for rcu_barrier() and friends. */
159 159
160static DEFINE_PER_CPU(struct rcu_head, rcu_barrier_head) = {NULL};
161static atomic_t rcu_barrier_cpu_count; 160static atomic_t rcu_barrier_cpu_count;
162static DEFINE_MUTEX(rcu_barrier_mutex); 161static DEFINE_MUTEX(rcu_barrier_mutex);
163static struct completion rcu_barrier_completion; 162static struct completion rcu_barrier_completion;
@@ -2282,12 +2281,11 @@ static void rcu_barrier_callback(struct rcu_head *notused)
2282 */ 2281 */
2283static void rcu_barrier_func(void *type) 2282static void rcu_barrier_func(void *type)
2284{ 2283{
2285 int cpu = smp_processor_id();
2286 struct rcu_head *head = &per_cpu(rcu_barrier_head, cpu);
2287 struct rcu_state *rsp = type; 2284 struct rcu_state *rsp = type;
2285 struct rcu_data *rdp = __this_cpu_ptr(rsp->rda);
2288 2286
2289 atomic_inc(&rcu_barrier_cpu_count); 2287 atomic_inc(&rcu_barrier_cpu_count);
2290 rsp->call(head, rcu_barrier_callback); 2288 rsp->call(&rdp->barrier_head, rcu_barrier_callback);
2291} 2289}
2292 2290
2293/* 2291/*
diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index 049896a835d9..586d93c978f2 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -314,6 +314,9 @@ struct rcu_data {
314 unsigned long n_rp_need_fqs; 314 unsigned long n_rp_need_fqs;
315 unsigned long n_rp_need_nothing; 315 unsigned long n_rp_need_nothing;
316 316
317 /* 6) _rcu_barrier() callback. */
318 struct rcu_head barrier_head;
319
317 int cpu; 320 int cpu;
318 struct rcu_state *rsp; 321 struct rcu_state *rsp;
319}; 322};