Merge "sched: fix suspicious RCU usage warning"

This commit is contained in:
qctecmdr 2020-10-09 23:26:56 -07:00 • committed by Gerrit - the friendly Code Review server
commit 919c7a1748

View file

@ -3056,14 +3056,21 @@ extern struct walt_sched_cluster *rq_cluster(struct rq *rq);
#ifdef CONFIG_UCLAMP_TASK_GROUP
static inline bool task_sched_boost(struct task_struct *p)
{
struct cgroup_subsys_state *css = task_css(p, cpu_cgrp_id);
struct cgroup_subsys_state *css;
struct task_group *tg;
bool sched_boost_enabled;
if (!css)
rcu_read_lock();
css = task_css(p, cpu_cgrp_id);
if (!css) {
rcu_read_unlock();
return false;
}
tg = container_of(css, struct task_group, css);
sched_boost_enabled = tg->wtg.sched_boost_enabled;
rcu_read_unlock();
return tg->wtg.sched_boost_enabled;
return sched_boost_enabled;
}
extern int sync_cgroup_colocation(struct task_struct *p, bool insert);