aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLinus Torvalds2012-12-12 10:18:24 -0600
committerLinus Torvalds2012-12-12 10:18:24 -0600
commitd206e09036d6201f90b2719484c8a59526c46125 (patch)
tree84b9057919bcb8cfd1cff47baa5fc74457e77d6d /block
parentfef3ff2eb777e76cfa5ae67591982d902c17139c (diff)
parent15ef4ffaa797034d5ff82844daf8f595d7c6d53c (diff)
downloadkernel-audio-d206e09036d6201f90b2719484c8a59526c46125.tar.gz
kernel-audio-d206e09036d6201f90b2719484c8a59526c46125.tar.xz
kernel-audio-d206e09036d6201f90b2719484c8a59526c46125.zip
Merge branch 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup changes from Tejun Heo: "A lot of activities on cgroup side. The big changes are focused on making cgroup hierarchy handling saner. - cgroup_rmdir() had peculiar semantics - it allowed cgroup destruction to be vetoed by individual controllers and tried to drain refcnt synchronously. The vetoing never worked properly and caused good deal of contortions in cgroup. memcg was the last reamining user. Michal Hocko removed the usage and cgroup_rmdir() path has been simplified significantly. This was done in a separate branch so that the memcg people can base further memcg changes on top. - The above allowed cleaning up cgroup lifecycle management and implementation of generic cgroup iterators which are used to improve hierarchy support. - cgroup_freezer updated to allow migration in and out of a frozen cgroup and handle hierarchy. If a cgroup is frozen, all descendant cgroups are frozen. - netcls_cgroup and netprio_cgroup updated to handle hierarchy properly. - Various fixes and cleanups. - Two merge commits. One to pull in memcg and rmdir cleanups (needed to build iterators). The other pulled in cgroup/for-3.7-fixes for device_cgroup fixes so that further device_cgroup patches can be stacked on top." Fixed up a trivial conflict in mm/memcontrol.c as per Tejun (due to commit bea8c150a7 ("memcg: fix hotplugged memory zone oops") in master touching code close to commit 2ef37d3fe4 ("memcg: Simplify mem_cgroup_force_empty_list error handling") in for-3.8) * 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (65 commits) cgroup: update Documentation/cgroups/00-INDEX cgroup_rm_file: don't delete the uncreated files cgroup: remove subsystem files when remounting cgroup cgroup: use cgroup_addrm_files() in cgroup_clear_directory() cgroup: warn about broken hierarchies only after css_online cgroup: list_del_init() on removed events cgroup: fix lockdep warning for event_control cgroup: move list add after list head initilization netprio_cgroup: allow nesting and inherit config on cgroup creation netprio_cgroup: implement netprio[_set]_prio() helpers netprio_cgroup: use cgroup->id instead of cgroup_netprio_state->prioidx netprio_cgroup: reimplement priomap expansion netprio_cgroup: shorten variable names in extend_netdev_table() netprio_cgroup: simplify write_priomap() netcls_cgroup: move config inheritance to ->css_online() and remove .broken_hierarchy marking cgroup: remove obsolete guarantee from cgroup_task_migrate. cgroup: add cgroup->id cgroup, cpuset: remove cgroup_subsys->post_clone() cgroup: s/CGRP_CLONE_CHILDREN/CGRP_CPUSET_CLONE_CHILDREN/ cgroup: rename ->create/post_create/pre_destroy/destroy() to ->css_alloc/online/offline/free() ...
Diffstat (limited to 'block')
-rw-r--r--block/blk-cgroup.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index d0b770391ad4..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 */
613static int blkcg_pre_destroy(struct cgroup *cgroup) 613static 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
@@ -632,10 +632,9 @@ static int blkcg_pre_destroy(struct cgroup *cgroup)
632 } 632 }
633 633
634 spin_unlock_irq(&blkcg->lock); 634 spin_unlock_irq(&blkcg->lock);
635 return 0;
636} 635}
637 636
638static void blkcg_destroy(struct cgroup *cgroup) 637static void blkcg_css_free(struct cgroup *cgroup)
639{ 638{
640 struct blkcg *blkcg = cgroup_to_blkcg(cgroup); 639 struct blkcg *blkcg = cgroup_to_blkcg(cgroup);
641 640
@@ -643,7 +642,7 @@ static void blkcg_destroy(struct cgroup *cgroup)
643 kfree(blkcg); 642 kfree(blkcg);
644} 643}
645 644
646static struct cgroup_subsys_state *blkcg_create(struct cgroup *cgroup) 645static struct cgroup_subsys_state *blkcg_css_alloc(struct cgroup *cgroup)
647{ 646{
648 static atomic64_t id_seq = ATOMIC64_INIT(0); 647 static atomic64_t id_seq = ATOMIC64_INIT(0);
649 struct blkcg *blkcg; 648 struct blkcg *blkcg;
@@ -740,10 +739,10 @@ static int blkcg_can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
740 739
741struct cgroup_subsys blkio_subsys = { 740struct cgroup_subsys blkio_subsys = {
742 .name = "blkio", 741 .name = "blkio",
743 .create = blkcg_create, 742 .css_alloc = blkcg_css_alloc,
743 .css_offline = blkcg_css_offline,
744 .css_free = blkcg_css_free,
744 .can_attach = blkcg_can_attach, 745 .can_attach = blkcg_can_attach,
745 .pre_destroy = blkcg_pre_destroy,
746 .destroy = blkcg_destroy,
747 .subsys_id = blkio_subsys_id, 746 .subsys_id = blkio_subsys_id,
748 .base_cftypes = blkcg_files, 747 .base_cftypes = blkcg_files,
749 .module = THIS_MODULE, 748 .module = THIS_MODULE,