blkcg, memcg: make blkcg depend on memcg on the default hierarchy
[deliverable/linux.git] / block / blk-cgroup.c
index 069bc202ffe340fb69e9e3dc9414fe8b03043bd1..63c3cd454d1edbfdb9b37578e14c7c39fc694135 100644 (file)
@@ -925,6 +925,14 @@ struct cgroup_subsys blkio_cgrp_subsys = {
        .css_free = blkcg_css_free,
        .can_attach = blkcg_can_attach,
        .base_cftypes = blkcg_files,
+#ifdef CONFIG_MEMCG
+       /*
+        * This ensures that, if available, memcg is automatically enabled
+        * together on the default hierarchy so that the owner cgroup can
+        * be retrieved from writeback pages.
+        */
+       .depends_on = 1 << memory_cgrp_id,
+#endif
 };
 EXPORT_SYMBOL_GPL(blkio_cgrp_subsys);
 
This page took 0.023752 seconds and 5 git commands to generate.