Merge branch 'for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
[pandora-kernel.git] / kernel / cpuset.c
index 14f7070..8c8bd65 100644 (file)
@@ -1765,28 +1765,17 @@ static struct cftype files[] = {
                .write_u64 = cpuset_write_u64,
                .private = FILE_SPREAD_SLAB,
        },
-};
-
-static struct cftype cft_memory_pressure_enabled = {
-       .name = "memory_pressure_enabled",
-       .read_u64 = cpuset_read_u64,
-       .write_u64 = cpuset_write_u64,
-       .private = FILE_MEMORY_PRESSURE_ENABLED,
-};
 
-static int cpuset_populate(struct cgroup_subsys *ss, struct cgroup *cont)
-{
-       int err;
+       {
+               .name = "memory_pressure_enabled",
+               .flags = CFTYPE_ONLY_ON_ROOT,
+               .read_u64 = cpuset_read_u64,
+               .write_u64 = cpuset_write_u64,
+               .private = FILE_MEMORY_PRESSURE_ENABLED,
+       },
 
-       err = cgroup_add_files(cont, ss, files, ARRAY_SIZE(files));
-       if (err)
-               return err;
-       /* memory_pressure_enabled is in root cpuset only */
-       if (!cont->parent)
-               err = cgroup_add_file(cont, ss,
-                                     &cft_memory_pressure_enabled);
-       return err;
-}
+       { }     /* terminate */
+};
 
 /*
  * post_clone() is called during cgroup_create() when the
@@ -1887,9 +1876,9 @@ struct cgroup_subsys cpuset_subsys = {
        .destroy = cpuset_destroy,
        .can_attach = cpuset_can_attach,
        .attach = cpuset_attach,
-       .populate = cpuset_populate,
        .post_clone = cpuset_post_clone,
        .subsys_id = cpuset_subsys_id,
+       .base_cftypes = files,
        .early_init = 1,
 };