summaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2011-05-24 10:23:21 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-05-24 10:23:21 +0200
commitb9f8ce059940064a732da49b5d6e618381dad956 (patch)
tree850281e8dd7bf5813d2960c2d42177803072bc02 /block/cfq-iosched.c
parent4cbadbd16e2fb727f6926597e0a580829e6222f1 (diff)
downloadlinux-b9f8ce059940064a732da49b5d6e618381dad956.tar.bz2
cfq-iosched: algebraic simplification in cfq_prio_to_maxrq()
Simplify the calculation in cfq_prio_to_maxrq(), plus replace CFQ_PRIO_LISTS to IOPRIO_BE_NR since they are the same and IOPRIO_BE_NR looks more reasonable in this context IMHO. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 0316f6eece03..00763e510228 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2102,7 +2102,7 @@ cfq_prio_to_maxrq(struct cfq_data *cfqd, struct cfq_queue *cfqq)
WARN_ON(cfqq->ioprio >= IOPRIO_BE_NR);
- return 2 * (base_rq + base_rq * (CFQ_PRIO_LISTS - 1 - cfqq->ioprio));
+ return 2 * base_rq * (IOPRIO_BE_NR - cfqq->ioprio);
}
/*