[PATCH] sched/core: remove check of p->sched_class

From: Yao Dongdong
Date: Mon Dec 29 2014 - 01:39:56 EST

Search all usage of p->sched_class in sched/core.c, no one check it
before use, so it seems that every task must belong to one sched_class.

Signed-off-by: Yao Dongdong <yaodongdong@xxxxxxxxxx>
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b5797b7..bdab49b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4740,7 +4740,7 @@ static struct rq *move_queued_task(struct task_struct *p, int new_cpu)

void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
- if (p->sched_class && p->sched_class->set_cpus_allowed)
+ if (p->sched_class->set_cpus_allowed)
p->sched_class->set_cpus_allowed(p, new_mask);

cpumask_copy(&p->cpus_allowed, new_mask);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/