aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
822 822
823#define CIC_SEEKY(cic) ((cic)->seek_mean > (128 * 1024)) 823#define CIC_SEEKY(cic) ((cic)->seek_mean > (128 * 1024))
824 824
825static int cfq_arm_slice_timer(struct cfq_data *cfqd, struct cfq_queue *cfqq) 825static 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 }