summaryrefslogtreecommitdiff
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorGui Jianfeng <guijianfeng@cn.fujitsu.com>2010-11-30 20:52:47 +0100
committerJens Axboe <jaxboe@fusionio.com>2010-11-30 20:52:47 +0100
commit760701bfe14faee8ea0608a9cab2046071d98a39 (patch)
tree780193b7803aced7ecb2a53f0ce43150eb8ebeab /block/cfq-iosched.c
parentb54ce60eb7f61f8e314b8b241b0469eda3bb1d42 (diff)
cfq-iosched: Get rid of on_st flag
It's able to check whether a CFQ group on a service tree by checking "cfqg->rb_node". There's no need to maintain an extra flag here. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
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 e18d316ae65..5d0349d602f 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -179,7 +179,6 @@ struct cfq_group {
/* group service_tree key */
u64 vdisktime;
unsigned int weight;
- bool on_st;
/* number of cfqq currently on this group */
int nr_cfqq;
@@ -863,7 +862,7 @@ cfq_group_service_tree_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
struct rb_node *n;
cfqg->nr_cfqq++;
- if (cfqg->on_st)
+ if (!RB_EMPTY_NODE(&cfqg->rb_node))
return;
/*
@@ -879,7 +878,6 @@ cfq_group_service_tree_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
cfqg->vdisktime = st->min_vdisktime;
__cfq_group_service_tree_add(st, cfqg);
- cfqg->on_st = true;
st->total_weight += cfqg->weight;
}
@@ -896,7 +894,6 @@ cfq_group_service_tree_del(struct cfq_data *cfqd, struct cfq_group *cfqg)
return;
cfq_log_cfqg(cfqd, cfqg, "del_from_rr group");
- cfqg->on_st = false;
st->total_weight -= cfqg->weight;
if (!RB_EMPTY_NODE(&cfqg->rb_node))
cfq_rb_erase(&cfqg->rb_node, st);