diff options
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 1f14b56d0d00..fa78686ec227 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -600,9 +600,12 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
600 | 600 | ||
601 | static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq) | 601 | static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq) |
602 | { | 602 | { |
603 | struct sched_entity *se = __pick_next_entity(cfs_rq); | 603 | struct sched_entity *se = NULL; |
604 | 604 | ||
605 | set_next_entity(cfs_rq, se); | 605 | if (first_fair(cfs_rq)) { |
606 | se = __pick_next_entity(cfs_rq); | ||
607 | set_next_entity(cfs_rq, se); | ||
608 | } | ||
606 | 609 | ||
607 | return se; | 610 | return se; |
608 | } | 611 | } |