diff options
author | Gui Jianfeng <guijianfeng@cn.fujitsu.com> | 2010-02-26 02:56:15 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-26 02:56:15 -0500 |
commit | 024f9066165ffe9c8284431c78adcbcddd309831 (patch) | |
tree | 11b64dd7861985aca57bd7624cd25c804afd4b1a /block/blk-cgroup.c | |
parent | 7f03292ee16e68be96aa88904afc6152f8d37736 (diff) |
cfq: Remove useless css reference get
There's no need to take css reference here, for the caller
has already called rcu_read_lock() to prevent cgroup from
being removed.
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index e7dbbaf5fb3e..c85d74cae200 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -23,20 +23,6 @@ static LIST_HEAD(blkio_list); | |||
23 | struct blkio_cgroup blkio_root_cgroup = { .weight = 2*BLKIO_WEIGHT_DEFAULT }; | 23 | struct blkio_cgroup blkio_root_cgroup = { .weight = 2*BLKIO_WEIGHT_DEFAULT }; |
24 | EXPORT_SYMBOL_GPL(blkio_root_cgroup); | 24 | EXPORT_SYMBOL_GPL(blkio_root_cgroup); |
25 | 25 | ||
26 | bool blkiocg_css_tryget(struct blkio_cgroup *blkcg) | ||
27 | { | ||
28 | if (!css_tryget(&blkcg->css)) | ||
29 | return false; | ||
30 | return true; | ||
31 | } | ||
32 | EXPORT_SYMBOL_GPL(blkiocg_css_tryget); | ||
33 | |||
34 | void blkiocg_css_put(struct blkio_cgroup *blkcg) | ||
35 | { | ||
36 | css_put(&blkcg->css); | ||
37 | } | ||
38 | EXPORT_SYMBOL_GPL(blkiocg_css_put); | ||
39 | |||
40 | struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup) | 26 | struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup) |
41 | { | 27 | { |
42 | return container_of(cgroup_subsys_state(cgroup, blkio_subsys_id), | 28 | return container_of(cgroup_subsys_state(cgroup, blkio_subsys_id), |