diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched_rt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index b8435fd47f78..0749c1837b10 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -438,12 +438,11 @@ static int find_lowest_rq(struct task_struct *task) | |||
438 | } | 438 | } |
439 | 439 | ||
440 | /* Will lock the rq it finds */ | 440 | /* Will lock the rq it finds */ |
441 | static struct rq *find_lock_lowest_rq(struct task_struct *task, | 441 | static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq) |
442 | struct rq *rq) | ||
443 | { | 442 | { |
444 | struct rq *lowest_rq = NULL; | 443 | struct rq *lowest_rq = NULL; |
445 | int cpu; | ||
446 | int tries; | 444 | int tries; |
445 | int cpu; | ||
447 | 446 | ||
448 | for (tries = 0; tries < RT_MAX_TRIES; tries++) { | 447 | for (tries = 0; tries < RT_MAX_TRIES; tries++) { |
449 | cpu = find_lowest_rq(task); | 448 | cpu = find_lowest_rq(task); |
@@ -462,9 +461,11 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, | |||
462 | * Also make sure that it wasn't scheduled on its rq. | 461 | * Also make sure that it wasn't scheduled on its rq. |
463 | */ | 462 | */ |
464 | if (unlikely(task_rq(task) != rq || | 463 | if (unlikely(task_rq(task) != rq || |
465 | !cpu_isset(lowest_rq->cpu, task->cpus_allowed) || | 464 | !cpu_isset(lowest_rq->cpu, |
465 | task->cpus_allowed) || | ||
466 | task_running(rq, task) || | 466 | task_running(rq, task) || |
467 | !task->se.on_rq)) { | 467 | !task->se.on_rq)) { |
468 | |||
468 | spin_unlock(&lowest_rq->lock); | 469 | spin_unlock(&lowest_rq->lock); |
469 | lowest_rq = NULL; | 470 | lowest_rq = NULL; |
470 | break; | 471 | break; |