diff options
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index c686bf63bba5..0d7107fb3dec 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -332,7 +332,7 @@ static void rcu_preempt_qs(void) | |||
332 | static void rcu_preempt_note_context_switch(bool preempt) | 332 | static void rcu_preempt_note_context_switch(bool preempt) |
333 | { | 333 | { |
334 | struct task_struct *t = current; | 334 | struct task_struct *t = current; |
335 | struct rcu_data *rdp; | 335 | struct rcu_data *rdp = this_cpu_ptr(rcu_state_p->rda); |
336 | struct rcu_node *rnp; | 336 | struct rcu_node *rnp; |
337 | 337 | ||
338 | lockdep_assert_irqs_disabled(); | 338 | lockdep_assert_irqs_disabled(); |
@@ -341,7 +341,6 @@ static void rcu_preempt_note_context_switch(bool preempt) | |||
341 | !t->rcu_read_unlock_special.b.blocked) { | 341 | !t->rcu_read_unlock_special.b.blocked) { |
342 | 342 | ||
343 | /* Possibly blocking in an RCU read-side critical section. */ | 343 | /* Possibly blocking in an RCU read-side critical section. */ |
344 | rdp = this_cpu_ptr(rcu_state_p->rda); | ||
345 | rnp = rdp->mynode; | 344 | rnp = rdp->mynode; |
346 | raw_spin_lock_rcu_node(rnp); | 345 | raw_spin_lock_rcu_node(rnp); |
347 | t->rcu_read_unlock_special.b.blocked = true; | 346 | t->rcu_read_unlock_special.b.blocked = true; |
@@ -383,6 +382,8 @@ static void rcu_preempt_note_context_switch(bool preempt) | |||
383 | * means that we continue to block the current grace period. | 382 | * means that we continue to block the current grace period. |
384 | */ | 383 | */ |
385 | rcu_preempt_qs(); | 384 | rcu_preempt_qs(); |
385 | if (rdp->deferred_qs) | ||
386 | rcu_report_exp_rdp(rcu_state_p, rdp, true); | ||
386 | } | 387 | } |
387 | 388 | ||
388 | /* | 389 | /* |