Lines Matching refs:cfts
251 struct cgroup *cgrp, struct cftype cfts[],
1711 struct cftype *cfts; in css_clear_dir() local
1730 list_for_each_entry(cfts, &css->ss->cfts, node) in css_clear_dir()
1731 cgroup_addrm_files(css, cgrp, cfts, false); in css_clear_dir()
1744 struct cftype *cfts, *failed_cfts; in css_populate_dir() local
1773 list_for_each_entry(cfts, &css->ss->cfts, node) { in css_populate_dir()
1774 ret = cgroup_addrm_files(css, cgrp, cfts, true); in css_populate_dir()
1776 failed_cfts = cfts; in css_populate_dir()
1786 list_for_each_entry(cfts, &css->ss->cfts, node) { in css_populate_dir()
1787 if (cfts == failed_cfts) in css_populate_dir()
1789 cgroup_addrm_files(css, cgrp, cfts, false); in css_populate_dir()
4322 struct cgroup *cgrp, struct cftype cfts[], in cgroup_addrm_files() argument
4331 for (cft = cfts; cft != cft_end && cft->name[0] != '\0'; cft++) { in cgroup_addrm_files()
4359 static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add) in cgroup_apply_cftypes() argument
4361 struct cgroup_subsys *ss = cfts[0].ss; in cgroup_apply_cftypes()
4375 ret = cgroup_addrm_files(css, cgrp, cfts, is_add); in cgroup_apply_cftypes()
4385 static void cgroup_exit_cftypes(struct cftype *cfts) in cgroup_exit_cftypes() argument
4389 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_exit_cftypes()
4402 static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_init_cftypes() argument
4407 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_init_cftypes()
4441 cgroup_exit_cftypes(cfts); in cgroup_init_cftypes()
4445 static void cgroup_rm_cftypes_locked(struct cftype *cfts) in cgroup_rm_cftypes_locked() argument
4449 list_del(&cfts->node); in cgroup_rm_cftypes_locked()
4450 cgroup_apply_cftypes(cfts, false); in cgroup_rm_cftypes_locked()
4451 cgroup_exit_cftypes(cfts); in cgroup_rm_cftypes_locked()
4465 int cgroup_rm_cftypes(struct cftype *cfts) in cgroup_rm_cftypes() argument
4467 if (!cfts || cfts[0].name[0] == '\0') in cgroup_rm_cftypes()
4470 if (!(cfts[0].flags & __CFTYPE_ADDED)) in cgroup_rm_cftypes()
4474 cgroup_rm_cftypes_locked(cfts); in cgroup_rm_cftypes()
4493 int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_cftypes() argument
4500 if (!cfts || cfts[0].name[0] == '\0') in cgroup_add_cftypes()
4503 ret = cgroup_init_cftypes(ss, cfts); in cgroup_add_cftypes()
4509 list_add_tail(&cfts->node, &ss->cfts); in cgroup_add_cftypes()
4510 ret = cgroup_apply_cftypes(cfts, true); in cgroup_add_cftypes()
4512 cgroup_rm_cftypes_locked(cfts); in cgroup_add_cftypes()
4526 int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_dfl_cftypes() argument
4530 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_dfl_cftypes()
4532 return cgroup_add_cftypes(ss, cfts); in cgroup_add_dfl_cftypes()
4543 int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_legacy_cftypes() argument
4547 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_legacy_cftypes()
4549 return cgroup_add_cftypes(ss, cfts); in cgroup_add_legacy_cftypes()
6118 INIT_LIST_HEAD(&ss->cfts); in cgroup_init_subsys()