cfq-iosched: simplify prio-unboost code

Eliminate redundant checks.

Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
Corrado Zoccolo 2009-11-02 10:40:37 +01:00 committed by Jens Axboe
parent ab0a9735e0
commit dddb74519a
1 changed files with 3 additions and 5 deletions

View File

@ -2359,12 +2359,10 @@ static void cfq_prio_boost(struct cfq_queue *cfqq)
cfqq->ioprio = IOPRIO_NORM;
} else {
/*
* check if we need to unboost the queue
* unboost the queue (if needed)
*/
if (cfqq->ioprio_class != cfqq->org_ioprio_class)
cfqq->ioprio_class = cfqq->org_ioprio_class;
if (cfqq->ioprio != cfqq->org_ioprio)
cfqq->ioprio = cfqq->org_ioprio;
cfqq->ioprio_class = cfqq->org_ioprio_class;
cfqq->ioprio = cfqq->org_ioprio;
}
}