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()
4038 struct cgroup *cgrp, struct cftype cfts[], in cgroup_addrm_files() argument
4047 for (cft = cfts; cft != cft_end && cft->name[0] != '\0'; cft++) { in cgroup_addrm_files()
4077 static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add) in cgroup_apply_cftypes() argument
4079 struct cgroup_subsys *ss = cfts[0].ss; in cgroup_apply_cftypes()
4093 ret = cgroup_addrm_files(css, cgrp, cfts, is_add); in cgroup_apply_cftypes()
4103 static void cgroup_exit_cftypes(struct cftype *cfts) in cgroup_exit_cftypes() argument
4107 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_exit_cftypes()
4119 static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_init_cftypes() argument
4123 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_init_cftypes()
4143 cgroup_exit_cftypes(cfts); in cgroup_init_cftypes()
4156 static int cgroup_rm_cftypes_locked(struct cftype *cfts) in cgroup_rm_cftypes_locked() argument
4160 if (!cfts || !cfts[0].ss) in cgroup_rm_cftypes_locked()
4163 list_del(&cfts->node); in cgroup_rm_cftypes_locked()
4164 cgroup_apply_cftypes(cfts, false); in cgroup_rm_cftypes_locked()
4165 cgroup_exit_cftypes(cfts); in cgroup_rm_cftypes_locked()
4180 int cgroup_rm_cftypes(struct cftype *cfts) in cgroup_rm_cftypes() argument
4185 ret = cgroup_rm_cftypes_locked(cfts); in cgroup_rm_cftypes()
4204 static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_cftypes() argument
4211 if (!cfts || cfts[0].name[0] == '\0') in cgroup_add_cftypes()
4214 ret = cgroup_init_cftypes(ss, cfts); in cgroup_add_cftypes()
4220 list_add_tail(&cfts->node, &ss->cfts); in cgroup_add_cftypes()
4221 ret = cgroup_apply_cftypes(cfts, true); in cgroup_add_cftypes()
4223 cgroup_rm_cftypes_locked(cfts); in cgroup_add_cftypes()
4237 int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_dfl_cftypes() argument
4241 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_dfl_cftypes()
4243 return cgroup_add_cftypes(ss, cfts); in cgroup_add_dfl_cftypes()
4254 int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_legacy_cftypes() argument
4258 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_legacy_cftypes()
4260 return cgroup_add_cftypes(ss, cfts); in cgroup_add_legacy_cftypes()
5741 INIT_LIST_HEAD(&ss->cfts); in cgroup_init_subsys()