aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutiny.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcutiny.c')
-rw-r--r--kernel/rcutiny.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index b1804ff83d5e..38729d3cd236 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -245,11 +245,13 @@ void rcu_barrier(void)
245{ 245{
246 struct rcu_synchronize rcu; 246 struct rcu_synchronize rcu;
247 247
248 init_rcu_head_on_stack(&rcu.head);
248 init_completion(&rcu.completion); 249 init_completion(&rcu.completion);
249 /* Will wake me after RCU finished. */ 250 /* Will wake me after RCU finished. */
250 call_rcu(&rcu.head, wakeme_after_rcu); 251 call_rcu(&rcu.head, wakeme_after_rcu);
251 /* Wait for it. */ 252 /* Wait for it. */
252 wait_for_completion(&rcu.completion); 253 wait_for_completion(&rcu.completion);
254 destroy_rcu_head_on_stack(&rcu.head);
253} 255}
254EXPORT_SYMBOL_GPL(rcu_barrier); 256EXPORT_SYMBOL_GPL(rcu_barrier);
255 257
@@ -257,11 +259,13 @@ void rcu_barrier_bh(void)
257{ 259{
258 struct rcu_synchronize rcu; 260 struct rcu_synchronize rcu;
259 261
262 init_rcu_head_on_stack(&rcu.head);
260 init_completion(&rcu.completion); 263 init_completion(&rcu.completion);
261 /* Will wake me after RCU finished. */ 264 /* Will wake me after RCU finished. */
262 call_rcu_bh(&rcu.head, wakeme_after_rcu); 265 call_rcu_bh(&rcu.head, wakeme_after_rcu);
263 /* Wait for it. */ 266 /* Wait for it. */
264 wait_for_completion(&rcu.completion); 267 wait_for_completion(&rcu.completion);
268 destroy_rcu_head_on_stack(&rcu.head);
265} 269}
266EXPORT_SYMBOL_GPL(rcu_barrier_bh); 270EXPORT_SYMBOL_GPL(rcu_barrier_bh);
267 271
@@ -269,11 +273,13 @@ void rcu_barrier_sched(void)
269{ 273{
270 struct rcu_synchronize rcu; 274 struct rcu_synchronize rcu;
271 275
276 init_rcu_head_on_stack(&rcu.head);
272 init_completion(&rcu.completion); 277 init_completion(&rcu.completion);
273 /* Will wake me after RCU finished. */ 278 /* Will wake me after RCU finished. */
274 call_rcu_sched(&rcu.head, wakeme_after_rcu); 279 call_rcu_sched(&rcu.head, wakeme_after_rcu);
275 /* Wait for it. */ 280 /* Wait for it. */
276 wait_for_completion(&rcu.completion); 281 wait_for_completion(&rcu.completion);
282 destroy_rcu_head_on_stack(&rcu.head);
277} 283}
278EXPORT_SYMBOL_GPL(rcu_barrier_sched); 284EXPORT_SYMBOL_GPL(rcu_barrier_sched);
279 285