diff options
| -rw-r--r-- | block/cfq-iosched.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 73a58628f54a..e18d316ae652 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
| @@ -87,7 +87,6 @@ struct cfq_rb_root { | |||
| 87 | unsigned count; | 87 | unsigned count; |
| 88 | unsigned total_weight; | 88 | unsigned total_weight; |
| 89 | u64 min_vdisktime; | 89 | u64 min_vdisktime; |
| 90 | struct rb_node *active; | ||
| 91 | }; | 90 | }; |
| 92 | #define CFQ_RB_ROOT (struct cfq_rb_root) { .rb = RB_ROOT, .left = NULL, \ | 91 | #define CFQ_RB_ROOT (struct cfq_rb_root) { .rb = RB_ROOT, .left = NULL, \ |
| 93 | .count = 0, .min_vdisktime = 0, } | 92 | .count = 0, .min_vdisktime = 0, } |
| @@ -563,11 +562,6 @@ static void update_min_vdisktime(struct cfq_rb_root *st) | |||
| 563 | u64 vdisktime = st->min_vdisktime; | 562 | u64 vdisktime = st->min_vdisktime; |
| 564 | struct cfq_group *cfqg; | 563 | struct cfq_group *cfqg; |
| 565 | 564 | ||
| 566 | if (st->active) { | ||
| 567 | cfqg = rb_entry_cfqg(st->active); | ||
| 568 | vdisktime = cfqg->vdisktime; | ||
| 569 | } | ||
| 570 | |||
| 571 | if (st->left) { | 565 | if (st->left) { |
| 572 | cfqg = rb_entry_cfqg(st->left); | 566 | cfqg = rb_entry_cfqg(st->left); |
| 573 | vdisktime = min_vdisktime(vdisktime, cfqg->vdisktime); | 567 | vdisktime = min_vdisktime(vdisktime, cfqg->vdisktime); |
| @@ -894,9 +888,6 @@ cfq_group_service_tree_del(struct cfq_data *cfqd, struct cfq_group *cfqg) | |||
| 894 | { | 888 | { |
| 895 | struct cfq_rb_root *st = &cfqd->grp_service_tree; | 889 | struct cfq_rb_root *st = &cfqd->grp_service_tree; |
| 896 | 890 | ||
| 897 | if (st->active == &cfqg->rb_node) | ||
| 898 | st->active = NULL; | ||
| 899 | |||
| 900 | BUG_ON(cfqg->nr_cfqq < 1); | 891 | BUG_ON(cfqg->nr_cfqq < 1); |
| 901 | cfqg->nr_cfqq--; | 892 | cfqg->nr_cfqq--; |
| 902 | 893 | ||
| @@ -1095,7 +1086,7 @@ static void cfq_put_cfqg(struct cfq_group *cfqg) | |||
| 1095 | if (!atomic_dec_and_test(&cfqg->ref)) | 1086 | if (!atomic_dec_and_test(&cfqg->ref)) |
| 1096 | return; | 1087 | return; |
| 1097 | for_each_cfqg_st(cfqg, i, j, st) | 1088 | for_each_cfqg_st(cfqg, i, j, st) |
| 1098 | BUG_ON(!RB_EMPTY_ROOT(&st->rb) || st->active != NULL); | 1089 | BUG_ON(!RB_EMPTY_ROOT(&st->rb)); |
| 1099 | kfree(cfqg); | 1090 | kfree(cfqg); |
| 1100 | } | 1091 | } |
| 1101 | 1092 | ||
| @@ -1687,9 +1678,6 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
| 1687 | if (cfqq == cfqd->active_queue) | 1678 | if (cfqq == cfqd->active_queue) |
| 1688 | cfqd->active_queue = NULL; | 1679 | cfqd->active_queue = NULL; |
| 1689 | 1680 | ||
| 1690 | if (&cfqq->cfqg->rb_node == cfqd->grp_service_tree.active) | ||
| 1691 | cfqd->grp_service_tree.active = NULL; | ||
| 1692 | |||
| 1693 | if (cfqd->active_cic) { | 1681 | if (cfqd->active_cic) { |
| 1694 | put_io_context(cfqd->active_cic->ioc); | 1682 | put_io_context(cfqd->active_cic->ioc); |
| 1695 | cfqd->active_cic = NULL; | 1683 | cfqd->active_cic = NULL; |
| @@ -2199,7 +2187,6 @@ static struct cfq_group *cfq_get_next_cfqg(struct cfq_data *cfqd) | |||
| 2199 | if (RB_EMPTY_ROOT(&st->rb)) | 2187 | if (RB_EMPTY_ROOT(&st->rb)) |
| 2200 | return NULL; | 2188 | return NULL; |
| 2201 | cfqg = cfq_rb_first_group(st); | 2189 | cfqg = cfq_rb_first_group(st); |
| 2202 | st->active = &cfqg->rb_node; | ||
| 2203 | update_min_vdisktime(st); | 2190 | update_min_vdisktime(st); |
| 2204 | return cfqg; | 2191 | return cfqg; |
| 2205 | } | 2192 | } |
