summaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-01-19 01:59:30 +0100
committerJens Axboe <axboe@carl.home.kernel.dk>2007-02-11 23:14:45 +0100
commit1792669cc1acc2069869b7ca41a0195240de05e0 (patch)
tree9ad405045d3ea65d15cae2c795e97280d072bb66 /block/cfq-iosched.c
parentcfq-iosched: account for slice over/under time (diff)
downloadlinux-1792669cc1acc2069869b7ca41a0195240de05e0.tar.xz
linux-1792669cc1acc2069869b7ca41a0195240de05e0.zip
cfq-iosched: don't pass in queue for cfq_arm_slice_timer()
It must always be the active queue, otherwise it's a bug. So just use the active_queue, don't pass it in explicitly. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 039b38cf805c..3df41a00b553 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -822,14 +822,13 @@ static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd)
#define CIC_SEEKY(cic) ((cic)->seek_mean > (128 * 1024))
-static int cfq_arm_slice_timer(struct cfq_data *cfqd, struct cfq_queue *cfqq)
-
+static int cfq_arm_slice_timer(struct cfq_data *cfqd)
{
+ struct cfq_queue *cfqq = cfqd->active_queue;
struct cfq_io_context *cic;
unsigned long sl;
WARN_ON(!RB_EMPTY_ROOT(&cfqq->sort_list));
- WARN_ON(cfqq != cfqd->active_queue);
/*
* idle is disabled, either manually or by past process history
@@ -937,7 +936,7 @@ static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd)
cfqq = NULL;
goto keep_queue;
} else if (cfq_cfqq_class_sync(cfqq)) {
- if (cfq_arm_slice_timer(cfqd, cfqq))
+ if (cfq_arm_slice_timer(cfqd))
return NULL;
}
@@ -1734,7 +1733,7 @@ static void cfq_completed_request(request_queue_t *q, struct request *rq)
if (cfq_slice_used(cfqq))
cfq_slice_expired(cfqd, 0);
else if (sync && RB_EMPTY_ROOT(&cfqq->sort_list)) {
- if (!cfq_arm_slice_timer(cfqd, cfqq))
+ if (!cfq_arm_slice_timer(cfqd))
cfq_schedule_dispatch(cfqd);
}
}