diff options
author | Tejun Heo <tj@kernel.org> | 2012-11-19 11:13:38 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-11-19 11:13:38 -0500 |
commit | 92fb97487a7e41b222c1417cabd1d1ab7cc3a48c (patch) | |
tree | c220c622b9ac9b16535535d448e9cd29be72c77e /block/blk-cgroup.c | |
parent | b1929db42f8a649d9a9e397119f628c27fd4021f (diff) |
cgroup: rename ->create/post_create/pre_destroy/destroy() to ->css_alloc/online/offline/free()
Rename cgroup_subsys css lifetime related callbacks to better describe
what their roles are. Also, update documentation.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 3dc60fc441cb..3f6d39d23bb6 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -600,7 +600,7 @@ struct cftype blkcg_files[] = { | |||
600 | }; | 600 | }; |
601 | 601 | ||
602 | /** | 602 | /** |
603 | * blkcg_pre_destroy - cgroup pre_destroy callback | 603 | * blkcg_css_offline - cgroup css_offline callback |
604 | * @cgroup: cgroup of interest | 604 | * @cgroup: cgroup of interest |
605 | * | 605 | * |
606 | * This function is called when @cgroup is about to go away and responsible | 606 | * This function is called when @cgroup is about to go away and responsible |
@@ -610,7 +610,7 @@ struct cftype blkcg_files[] = { | |||
610 | * | 610 | * |
611 | * This is the blkcg counterpart of ioc_release_fn(). | 611 | * This is the blkcg counterpart of ioc_release_fn(). |
612 | */ | 612 | */ |
613 | static void blkcg_pre_destroy(struct cgroup *cgroup) | 613 | static void blkcg_css_offline(struct cgroup *cgroup) |
614 | { | 614 | { |
615 | struct blkcg *blkcg = cgroup_to_blkcg(cgroup); | 615 | struct blkcg *blkcg = cgroup_to_blkcg(cgroup); |
616 | 616 | ||
@@ -634,7 +634,7 @@ static void blkcg_pre_destroy(struct cgroup *cgroup) | |||
634 | spin_unlock_irq(&blkcg->lock); | 634 | spin_unlock_irq(&blkcg->lock); |
635 | } | 635 | } |
636 | 636 | ||
637 | static void blkcg_destroy(struct cgroup *cgroup) | 637 | static void blkcg_css_free(struct cgroup *cgroup) |
638 | { | 638 | { |
639 | struct blkcg *blkcg = cgroup_to_blkcg(cgroup); | 639 | struct blkcg *blkcg = cgroup_to_blkcg(cgroup); |
640 | 640 | ||
@@ -642,7 +642,7 @@ static void blkcg_destroy(struct cgroup *cgroup) | |||
642 | kfree(blkcg); | 642 | kfree(blkcg); |
643 | } | 643 | } |
644 | 644 | ||
645 | static struct cgroup_subsys_state *blkcg_create(struct cgroup *cgroup) | 645 | static struct cgroup_subsys_state *blkcg_css_alloc(struct cgroup *cgroup) |
646 | { | 646 | { |
647 | static atomic64_t id_seq = ATOMIC64_INIT(0); | 647 | static atomic64_t id_seq = ATOMIC64_INIT(0); |
648 | struct blkcg *blkcg; | 648 | struct blkcg *blkcg; |
@@ -739,10 +739,10 @@ static int blkcg_can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset) | |||
739 | 739 | ||
740 | struct cgroup_subsys blkio_subsys = { | 740 | struct cgroup_subsys blkio_subsys = { |
741 | .name = "blkio", | 741 | .name = "blkio", |
742 | .create = blkcg_create, | 742 | .css_alloc = blkcg_css_alloc, |
743 | .css_offline = blkcg_css_offline, | ||
744 | .css_free = blkcg_css_free, | ||
743 | .can_attach = blkcg_can_attach, | 745 | .can_attach = blkcg_can_attach, |
744 | .pre_destroy = blkcg_pre_destroy, | ||
745 | .destroy = blkcg_destroy, | ||
746 | .subsys_id = blkio_subsys_id, | 746 | .subsys_id = blkio_subsys_id, |
747 | .base_cftypes = blkcg_files, | 747 | .base_cftypes = blkcg_files, |
748 | .module = THIS_MODULE, | 748 | .module = THIS_MODULE, |