diff options
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 28d227c5ca77..e17da947f6bd 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -928,7 +928,15 @@ struct cgroup_subsys blkio_cgrp_subsys = { | |||
928 | .css_offline = blkcg_css_offline, | 928 | .css_offline = blkcg_css_offline, |
929 | .css_free = blkcg_css_free, | 929 | .css_free = blkcg_css_free, |
930 | .can_attach = blkcg_can_attach, | 930 | .can_attach = blkcg_can_attach, |
931 | .base_cftypes = blkcg_files, | 931 | .legacy_cftypes = blkcg_files, |
932 | #ifdef CONFIG_MEMCG | ||
933 | /* | ||
934 | * This ensures that, if available, memcg is automatically enabled | ||
935 | * together on the default hierarchy so that the owner cgroup can | ||
936 | * be retrieved from writeback pages. | ||
937 | */ | ||
938 | .depends_on = 1 << memory_cgrp_id, | ||
939 | #endif | ||
932 | }; | 940 | }; |
933 | EXPORT_SYMBOL_GPL(blkio_cgrp_subsys); | 941 | EXPORT_SYMBOL_GPL(blkio_cgrp_subsys); |
934 | 942 | ||
@@ -1120,7 +1128,8 @@ int blkcg_policy_register(struct blkcg_policy *pol) | |||
1120 | 1128 | ||
1121 | /* everything is in place, add intf files for the new policy */ | 1129 | /* everything is in place, add intf files for the new policy */ |
1122 | if (pol->cftypes) | 1130 | if (pol->cftypes) |
1123 | WARN_ON(cgroup_add_cftypes(&blkio_cgrp_subsys, pol->cftypes)); | 1131 | WARN_ON(cgroup_add_legacy_cftypes(&blkio_cgrp_subsys, |
1132 | pol->cftypes)); | ||
1124 | ret = 0; | 1133 | ret = 0; |
1125 | out_unlock: | 1134 | out_unlock: |
1126 | mutex_unlock(&blkcg_pol_mutex); | 1135 | mutex_unlock(&blkcg_pol_mutex); |