diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-01-18 19:59:30 -0500 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2007-02-11 17:14:45 -0500 |
commit | 1792669cc1acc2069869b7ca41a0195240de05e0 (patch) | |
tree | 9ad405045d3ea65d15cae2c795e97280d072bb66 /block/cfq-iosched.c | |
parent | c5b680f3b7593f2b066c683df799d19f807fb23d (diff) |
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.c | 9 |
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) | |||
822 | 822 | ||
823 | #define CIC_SEEKY(cic) ((cic)->seek_mean > (128 * 1024)) | 823 | #define CIC_SEEKY(cic) ((cic)->seek_mean > (128 * 1024)) |
824 | 824 | ||
825 | static int cfq_arm_slice_timer(struct cfq_data *cfqd, struct cfq_queue *cfqq) | 825 | static int cfq_arm_slice_timer(struct cfq_data *cfqd) |
826 | |||
827 | { | 826 | { |
827 | struct cfq_queue *cfqq = cfqd->active_queue; | ||
828 | struct cfq_io_context *cic; | 828 | struct cfq_io_context *cic; |
829 | unsigned long sl; | 829 | unsigned long sl; |
830 | 830 | ||
831 | WARN_ON(!RB_EMPTY_ROOT(&cfqq->sort_list)); | 831 | WARN_ON(!RB_EMPTY_ROOT(&cfqq->sort_list)); |
832 | WARN_ON(cfqq != cfqd->active_queue); | ||
833 | 832 | ||
834 | /* | 833 | /* |
835 | * idle is disabled, either manually or by past process history | 834 | * 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) | |||
937 | cfqq = NULL; | 936 | cfqq = NULL; |
938 | goto keep_queue; | 937 | goto keep_queue; |
939 | } else if (cfq_cfqq_class_sync(cfqq)) { | 938 | } else if (cfq_cfqq_class_sync(cfqq)) { |
940 | if (cfq_arm_slice_timer(cfqd, cfqq)) | 939 | if (cfq_arm_slice_timer(cfqd)) |
941 | return NULL; | 940 | return NULL; |
942 | } | 941 | } |
943 | 942 | ||
@@ -1734,7 +1733,7 @@ static void cfq_completed_request(request_queue_t *q, struct request *rq) | |||
1734 | if (cfq_slice_used(cfqq)) | 1733 | if (cfq_slice_used(cfqq)) |
1735 | cfq_slice_expired(cfqd, 0); | 1734 | cfq_slice_expired(cfqd, 0); |
1736 | else if (sync && RB_EMPTY_ROOT(&cfqq->sort_list)) { | 1735 | else if (sync && RB_EMPTY_ROOT(&cfqq->sort_list)) { |
1737 | if (!cfq_arm_slice_timer(cfqd, cfqq)) | 1736 | if (!cfq_arm_slice_timer(cfqd)) |
1738 | cfq_schedule_dispatch(cfqd); | 1737 | cfq_schedule_dispatch(cfqd); |
1739 | } | 1738 | } |
1740 | } | 1739 | } |