aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index e18d316ae652..5d0349d602fe 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -179,7 +179,6 @@ struct cfq_group {
179 /* group service_tree key */ 179 /* group service_tree key */
180 u64 vdisktime; 180 u64 vdisktime;
181 unsigned int weight; 181 unsigned int weight;
182 bool on_st;
183 182
184 /* number of cfqq currently on this group */ 183 /* number of cfqq currently on this group */
185 int nr_cfqq; 184 int nr_cfqq;
@@ -863,7 +862,7 @@ cfq_group_service_tree_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
863 struct rb_node *n; 862 struct rb_node *n;
864 863
865 cfqg->nr_cfqq++; 864 cfqg->nr_cfqq++;
866 if (cfqg->on_st) 865 if (!RB_EMPTY_NODE(&cfqg->rb_node))
867 return; 866 return;
868 867
869 /* 868 /*
@@ -879,7 +878,6 @@ cfq_group_service_tree_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
879 cfqg->vdisktime = st->min_vdisktime; 878 cfqg->vdisktime = st->min_vdisktime;
880 879
881 __cfq_group_service_tree_add(st, cfqg); 880 __cfq_group_service_tree_add(st, cfqg);
882 cfqg->on_st = true;
883 st->total_weight += cfqg->weight; 881 st->total_weight += cfqg->weight;
884} 882}
885 883
@@ -896,7 +894,6 @@ cfq_group_service_tree_del(struct cfq_data *cfqd, struct cfq_group *cfqg)
896 return; 894 return;
897 895
898 cfq_log_cfqg(cfqd, cfqg, "del_from_rr group"); 896 cfq_log_cfqg(cfqd, cfqg, "del_from_rr group");
899 cfqg->on_st = false;
900 st->total_weight -= cfqg->weight; 897 st->total_weight -= cfqg->weight;
901 if (!RB_EMPTY_NODE(&cfqg->rb_node)) 898 if (!RB_EMPTY_NODE(&cfqg->rb_node))
902 cfq_rb_erase(&cfqg->rb_node, st); 899 cfq_rb_erase(&cfqg->rb_node, st);