The functions sync_throttle() and unregister_fair_sched_group() are
called during the creation and destruction of cgroups. They are never
called for the root task-group. Remove checks that always yield the
same result when operating on non-root task groups.

Signed-off-by: Jan H. Schönherr <jscho...@amazon.de>
---
 kernel/sched/fair.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 5d6225aedbfe..5cad364e3a88 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4716,9 +4716,6 @@ static void sync_throttle(struct task_group *tg, int cpu)
        if (!cfs_bandwidth_used())
                return;
 
-       if (!tg->parent)
-               return;
-
        cfs_rq = tg->cfs_rq[cpu];
        pcfs_rq = tg->parent->cfs_rq[cpu];
 
@@ -9881,8 +9878,7 @@ void unregister_fair_sched_group(struct task_group *tg)
        int cpu;
 
        for_each_possible_cpu(cpu) {
-               if (tg->cfs_rq[cpu]->my_se)
-                       remove_entity_load_avg(tg->cfs_rq[cpu]->my_se);
+               remove_entity_load_avg(tg->cfs_rq[cpu]->my_se);
 
                /*
                 * Only empty task groups can be destroyed; so we can 
speculatively
-- 
2.9.3.1.gcba166c.dirty

Reply via email to