Lines Matching refs:cfts
246 struct cgroup *cgrp, struct cftype cfts[],
1672 struct cftype *cfts; in css_clear_dir() local
1681 cfts = cgroup_base_files; in css_clear_dir()
1683 cfts = cgroup1_base_files; in css_clear_dir()
1685 cgroup_addrm_files(css, cgrp, cfts, false); in css_clear_dir()
1687 list_for_each_entry(cfts, &css->ss->cfts, node) in css_clear_dir()
1688 cgroup_addrm_files(css, cgrp, cfts, false); in css_clear_dir()
1701 struct cftype *cfts, *failed_cfts; in css_populate_dir() local
1709 cfts = cgroup_base_files; in css_populate_dir()
1711 cfts = cgroup1_base_files; in css_populate_dir()
1713 ret = cgroup_addrm_files(&cgrp->self, cgrp, cfts, true); in css_populate_dir()
1717 list_for_each_entry(cfts, &css->ss->cfts, node) { in css_populate_dir()
1718 ret = cgroup_addrm_files(css, cgrp, cfts, true); in css_populate_dir()
1720 failed_cfts = cfts; in css_populate_dir()
1730 list_for_each_entry(cfts, &css->ss->cfts, node) { in css_populate_dir()
1731 if (cfts == failed_cfts) in css_populate_dir()
1733 cgroup_addrm_files(css, cgrp, cfts, false); in css_populate_dir()
3991 struct cgroup *cgrp, struct cftype cfts[], in cgroup_addrm_files() argument
4000 for (cft = cfts; cft != cft_end && cft->name[0] != '\0'; cft++) { in cgroup_addrm_files()
4030 static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add) in cgroup_apply_cftypes() argument
4032 struct cgroup_subsys *ss = cfts[0].ss; in cgroup_apply_cftypes()
4046 ret = cgroup_addrm_files(css, cgrp, cfts, is_add); in cgroup_apply_cftypes()
4056 static void cgroup_exit_cftypes(struct cftype *cfts) in cgroup_exit_cftypes() argument
4060 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_exit_cftypes()
4072 static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_init_cftypes() argument
4076 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_init_cftypes()
4096 cgroup_exit_cftypes(cfts); in cgroup_init_cftypes()
4109 static int cgroup_rm_cftypes_locked(struct cftype *cfts) in cgroup_rm_cftypes_locked() argument
4113 if (!cfts || !cfts[0].ss) in cgroup_rm_cftypes_locked()
4116 list_del(&cfts->node); in cgroup_rm_cftypes_locked()
4117 cgroup_apply_cftypes(cfts, false); in cgroup_rm_cftypes_locked()
4118 cgroup_exit_cftypes(cfts); in cgroup_rm_cftypes_locked()
4133 int cgroup_rm_cftypes(struct cftype *cfts) in cgroup_rm_cftypes() argument
4138 ret = cgroup_rm_cftypes_locked(cfts); in cgroup_rm_cftypes()
4157 static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_cftypes() argument
4164 if (!cfts || cfts[0].name[0] == '\0') in cgroup_add_cftypes()
4167 ret = cgroup_init_cftypes(ss, cfts); in cgroup_add_cftypes()
4173 list_add_tail(&cfts->node, &ss->cfts); in cgroup_add_cftypes()
4174 ret = cgroup_apply_cftypes(cfts, true); in cgroup_add_cftypes()
4176 cgroup_rm_cftypes_locked(cfts); in cgroup_add_cftypes()
4190 int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_dfl_cftypes() argument
4194 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_dfl_cftypes()
4196 return cgroup_add_cftypes(ss, cfts); in cgroup_add_dfl_cftypes()
4207 int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_legacy_cftypes() argument
4211 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_legacy_cftypes()
4213 return cgroup_add_cftypes(ss, cfts); in cgroup_add_legacy_cftypes()
5687 INIT_LIST_HEAD(&ss->cfts); in cgroup_init_subsys()