Skip to content

Commit

Permalink
cfq-iosched: simplify prio-unboost code
Browse files Browse the repository at this point in the history
Eliminate redundant checks.

Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Corrado Zoccolo authored and Jens Axboe committed Nov 2, 2009
1 parent ab0a973 commit dddb745
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit dddb745

Please sign in to comment.