unsigned long flags;
long lastcomp;
struct rcu_node *rnp = rcu_get_root(rsp);
- u8 signaled;
u8 forcenow;
u8 gpdone;
rsp->n_force_qs++;
spin_lock(&rnp->lock); /* irqs already disabled */
lastcomp = rsp->gpnum - 1;
- signaled = rsp->signaled;
rsp->jiffies_force_qs = jiffies + RCU_JIFFIES_TILL_FORCE_QS;
if(!rcu_gp_in_progress(rsp)) {
rsp->n_force_qs_ngp++;
goto unlock_fqs_ret; /* no GP in progress, time updated. */
}
rsp->fqs_active = 1;
- switch (signaled) {
+ switch (rsp->signaled) {
case RCU_GP_IDLE:
case RCU_GP_INIT:
/* Update state, record completion counter. */
forcenow = 0;
if (lastcomp + 1 == rsp->gpnum &&
- lastcomp == rsp->completed &&
- rsp->signaled == signaled) {
+ lastcomp == rsp->completed) {
+ forcenow = rsp->signaled == RCU_SAVE_COMPLETED;
rsp->signaled = RCU_FORCE_QS;
rsp->completed_fqs = lastcomp;
- forcenow = signaled == RCU_SAVE_COMPLETED;
}
if (!forcenow)
break;