kernfs, sysfs, cgroup, intel_rdt: Support fs_context
[sfrench/cifs-2.6.git] / kernel / cgroup / cgroup-internal.h
index 37cf709b7a0ef4f0defc6e4d99488c873d3883cf..30e39f3932ad06bb3f89fe08bc11c5988bd4ea73 100644 (file)
@@ -41,6 +41,7 @@ extern void __init enable_debug_cgroup(void);
  * The cgroup filesystem superblock creation/mount context.
  */
 struct cgroup_fs_context {
+       struct kernfs_fs_context kfc;
        struct cgroup_root      *root;
        struct cgroup_namespace *ns;
        unsigned int    flags;                  /* CGRP_ROOT_* flags */
@@ -56,7 +57,9 @@ struct cgroup_fs_context {
 
 static inline struct cgroup_fs_context *cgroup_fc2context(struct fs_context *fc)
 {
-       return fc->fs_private;
+       struct kernfs_fs_context *kfc = fc->fs_private;
+
+       return container_of(kfc, struct cgroup_fs_context, kfc);
 }
 
 /*