aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2009-12-16 17:52:58 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-12-18 06:40:21 -0500
commitfb104db41e6e006c85ce1097f372cd1e10c1755c (patch)
treeb769fd161d325f959e3c2c36116c5eb2f0e29f00
parent1db32c40600437c5e049796bd32f49f61244c6ef (diff)
cfq-iosched: Get rid of nr_groups
o Currently code does not seem to be using cfqd->nr_groups. Get rid of it. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Reviewed-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--block/cfq-iosched.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index a0e5347767d9..d9bfa09e68c1 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -208,8 +208,6 @@ struct cfq_data {
208 /* Root service tree for cfq_groups */ 208 /* Root service tree for cfq_groups */
209 struct cfq_rb_root grp_service_tree; 209 struct cfq_rb_root grp_service_tree;
210 struct cfq_group root_group; 210 struct cfq_group root_group;
211 /* Number of active cfq groups on group service tree */
212 int nr_groups;
213 211
214 /* 212 /*
215 * The priority currently being served 213 * The priority currently being served
@@ -842,7 +840,6 @@ cfq_group_service_tree_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
842 840
843 __cfq_group_service_tree_add(st, cfqg); 841 __cfq_group_service_tree_add(st, cfqg);
844 cfqg->on_st = true; 842 cfqg->on_st = true;
845 cfqd->nr_groups++;
846 st->total_weight += cfqg->weight; 843 st->total_weight += cfqg->weight;
847} 844}
848 845
@@ -863,7 +860,6 @@ cfq_group_service_tree_del(struct cfq_data *cfqd, struct cfq_group *cfqg)
863 860
864 cfq_log_cfqg(cfqd, cfqg, "del_from_rr group"); 861 cfq_log_cfqg(cfqd, cfqg, "del_from_rr group");
865 cfqg->on_st = false; 862 cfqg->on_st = false;
866 cfqd->nr_groups--;
867 st->total_weight -= cfqg->weight; 863 st->total_weight -= cfqg->weight;
868 if (!RB_EMPTY_NODE(&cfqg->rb_node)) 864 if (!RB_EMPTY_NODE(&cfqg->rb_node))
869 cfq_rb_erase(&cfqg->rb_node, st); 865 cfq_rb_erase(&cfqg->rb_node, st);