diff options
Diffstat (limited to 'kernel/sched/stop_task.c')
| -rw-r--r-- | kernel/sched/stop_task.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c index fdb6bb0b3356..d6ce65dde541 100644 --- a/kernel/sched/stop_task.c +++ b/kernel/sched/stop_task.c | |||
| @@ -23,16 +23,19 @@ check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags) | |||
| 23 | /* we're never preempted */ | 23 | /* we're never preempted */ |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | static struct task_struct *pick_next_task_stop(struct rq *rq) | 26 | static struct task_struct * |
| 27 | pick_next_task_stop(struct rq *rq, struct task_struct *prev) | ||
| 27 | { | 28 | { |
| 28 | struct task_struct *stop = rq->stop; | 29 | struct task_struct *stop = rq->stop; |
| 29 | 30 | ||
| 30 | if (stop && stop->on_rq) { | 31 | if (!stop || !stop->on_rq) |
| 31 | stop->se.exec_start = rq_clock_task(rq); | 32 | return NULL; |
| 32 | return stop; | ||
| 33 | } | ||
| 34 | 33 | ||
| 35 | return NULL; | 34 | put_prev_task(rq, prev); |
| 35 | |||
| 36 | stop->se.exec_start = rq_clock_task(rq); | ||
| 37 | |||
| 38 | return stop; | ||
| 36 | } | 39 | } |
| 37 | 40 | ||
| 38 | static void | 41 | static void |
