rcu: Eliminate redundant NULL-pointer check
Because rcu_wake_cond() checks for a null task_struct pointer, there is no need for its callers to do so. This commit eliminates the redundant check. Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
This commit is contained in:
parent
5d8a752e31
commit
a2badefa85
|
@ -1191,8 +1191,6 @@ static int rcu_boost_kthread(void *arg)
|
||||||
static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
|
static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
|
||||||
__releases(rnp->lock)
|
__releases(rnp->lock)
|
||||||
{
|
{
|
||||||
struct task_struct *t;
|
|
||||||
|
|
||||||
raw_lockdep_assert_held_rcu_node(rnp);
|
raw_lockdep_assert_held_rcu_node(rnp);
|
||||||
if (!rcu_preempt_blocked_readers_cgp(rnp) && rnp->exp_tasks == NULL) {
|
if (!rcu_preempt_blocked_readers_cgp(rnp) && rnp->exp_tasks == NULL) {
|
||||||
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
|
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
|
||||||
|
@ -1206,9 +1204,8 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
|
||||||
if (rnp->exp_tasks == NULL)
|
if (rnp->exp_tasks == NULL)
|
||||||
rnp->boost_tasks = rnp->gp_tasks;
|
rnp->boost_tasks = rnp->gp_tasks;
|
||||||
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
|
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
|
||||||
t = rnp->boost_kthread_task;
|
rcu_wake_cond(rnp->boost_kthread_task,
|
||||||
if (t)
|
rnp->boost_kthread_status);
|
||||||
rcu_wake_cond(t, rnp->boost_kthread_status);
|
|
||||||
} else {
|
} else {
|
||||||
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
|
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue