Lines Matching refs:cfts

195 static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[],
1209 struct cftype *cfts; in cgroup_clear_dir() local
1213 list_for_each_entry(cfts, &ss->cfts, node) in cgroup_clear_dir()
1214 cgroup_addrm_files(cgrp, cfts, false); in cgroup_clear_dir()
3105 static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[], in cgroup_addrm_files() argument
3113 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_addrm_files()
3138 static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add) in cgroup_apply_cftypes() argument
3141 struct cgroup_subsys *ss = cfts[0].ss; in cgroup_apply_cftypes()
3155 ret = cgroup_addrm_files(cgrp, cfts, is_add); in cgroup_apply_cftypes()
3165 static void cgroup_exit_cftypes(struct cftype *cfts) in cgroup_exit_cftypes() argument
3169 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_exit_cftypes()
3181 static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_init_cftypes() argument
3185 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_init_cftypes()
3202 cgroup_exit_cftypes(cfts); in cgroup_init_cftypes()
3215 static int cgroup_rm_cftypes_locked(struct cftype *cfts) in cgroup_rm_cftypes_locked() argument
3219 if (!cfts || !cfts[0].ss) in cgroup_rm_cftypes_locked()
3222 list_del(&cfts->node); in cgroup_rm_cftypes_locked()
3223 cgroup_apply_cftypes(cfts, false); in cgroup_rm_cftypes_locked()
3224 cgroup_exit_cftypes(cfts); in cgroup_rm_cftypes_locked()
3239 int cgroup_rm_cftypes(struct cftype *cfts) in cgroup_rm_cftypes() argument
3244 ret = cgroup_rm_cftypes_locked(cfts); in cgroup_rm_cftypes()
3263 static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_cftypes() argument
3270 if (!cfts || cfts[0].name[0] == '\0') in cgroup_add_cftypes()
3273 ret = cgroup_init_cftypes(ss, cfts); in cgroup_add_cftypes()
3279 list_add_tail(&cfts->node, &ss->cfts); in cgroup_add_cftypes()
3280 ret = cgroup_apply_cftypes(cfts, true); in cgroup_add_cftypes()
3282 cgroup_rm_cftypes_locked(cfts); in cgroup_add_cftypes()
3296 int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_dfl_cftypes() argument
3300 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_dfl_cftypes()
3302 return cgroup_add_cftypes(ss, cfts); in cgroup_add_dfl_cftypes()
3313 int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_legacy_cftypes() argument
3324 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_legacy_cftypes()
3328 return cgroup_add_cftypes(ss, cfts); in cgroup_add_legacy_cftypes()
4331 struct cftype *cfts; in cgroup_populate_dir() local
4336 list_for_each_entry(cfts, &ss->cfts, node) { in cgroup_populate_dir()
4337 ret = cgroup_addrm_files(cgrp, cfts, true); in cgroup_populate_dir()
4916 INIT_LIST_HEAD(&ss->cfts); in cgroup_init_subsys()