sched/fair: Clean up the __clear_buddies_*() functions

Slightly easier code flow, no functional changes.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1328936700.2476.17.camel@laptop
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Peter Zijlstra 2012-02-11 06:05:00 +01:00 committed by Ingo Molnar
parent 606dba2e28
commit f10447998a
1 changed files with 9 additions and 9 deletions

View File

@ -2739,10 +2739,10 @@ static void __clear_buddies_last(struct sched_entity *se)
{
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->last == se)
cfs_rq->last = NULL;
else
if (cfs_rq->last != se)
break;
cfs_rq->last = NULL;
}
}
@ -2750,10 +2750,10 @@ static void __clear_buddies_next(struct sched_entity *se)
{
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->next == se)
cfs_rq->next = NULL;
else
if (cfs_rq->next != se)
break;
cfs_rq->next = NULL;
}
}
@ -2761,10 +2761,10 @@ static void __clear_buddies_skip(struct sched_entity *se)
{
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->skip == se)
cfs_rq->skip = NULL;
else
if (cfs_rq->skip != se)
break;
cfs_rq->skip = NULL;
}
}