diff options
Diffstat (limited to 'kernel')
-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) static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq) { - struct sched_entity *se = __pick_next_entity(cfs_rq); + struct sched_entity *se = NULL; - set_next_entity(cfs_rq, se); + if (first_fair(cfs_rq)) { + se = __pick_next_entity(cfs_rq); + set_next_entity(cfs_rq, se); + } return se; } |