Lines Matching refs:cfts
222 struct cgroup *cgrp, struct cftype cfts[],
1643 struct cftype *cfts; in css_clear_dir() local
1652 cfts = cgroup_base_files; in css_clear_dir()
1654 cfts = cgroup1_base_files; in css_clear_dir()
1656 cgroup_addrm_files(css, cgrp, cfts, false); in css_clear_dir()
1658 list_for_each_entry(cfts, &css->ss->cfts, node) in css_clear_dir()
1659 cgroup_addrm_files(css, cgrp, cfts, false); in css_clear_dir()
1672 struct cftype *cfts, *failed_cfts; in css_populate_dir() local
1680 cfts = cgroup_base_files; in css_populate_dir()
1682 cfts = cgroup1_base_files; in css_populate_dir()
1684 ret = cgroup_addrm_files(&cgrp->self, cgrp, cfts, true); in css_populate_dir()
1688 list_for_each_entry(cfts, &css->ss->cfts, node) { in css_populate_dir()
1689 ret = cgroup_addrm_files(css, cgrp, cfts, true); in css_populate_dir()
1691 failed_cfts = cfts; in css_populate_dir()
1701 list_for_each_entry(cfts, &css->ss->cfts, node) { in css_populate_dir()
1702 if (cfts == failed_cfts) in css_populate_dir()
1704 cgroup_addrm_files(css, cgrp, cfts, false); in css_populate_dir()
3861 struct cgroup *cgrp, struct cftype cfts[], in cgroup_addrm_files() argument
3870 for (cft = cfts; cft != cft_end && cft->name[0] != '\0'; cft++) { in cgroup_addrm_files()
3898 static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add) in cgroup_apply_cftypes() argument
3900 struct cgroup_subsys *ss = cfts[0].ss; in cgroup_apply_cftypes()
3914 ret = cgroup_addrm_files(css, cgrp, cfts, is_add); in cgroup_apply_cftypes()
3924 static void cgroup_exit_cftypes(struct cftype *cfts) in cgroup_exit_cftypes() argument
3928 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_exit_cftypes()
3940 static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_init_cftypes() argument
3944 for (cft = cfts; cft->name[0] != '\0'; cft++) { in cgroup_init_cftypes()
3961 cgroup_exit_cftypes(cfts); in cgroup_init_cftypes()
3974 static int cgroup_rm_cftypes_locked(struct cftype *cfts) in cgroup_rm_cftypes_locked() argument
3978 if (!cfts || !cfts[0].ss) in cgroup_rm_cftypes_locked()
3981 list_del(&cfts->node); in cgroup_rm_cftypes_locked()
3982 cgroup_apply_cftypes(cfts, false); in cgroup_rm_cftypes_locked()
3983 cgroup_exit_cftypes(cfts); in cgroup_rm_cftypes_locked()
3998 int cgroup_rm_cftypes(struct cftype *cfts) in cgroup_rm_cftypes() argument
4003 ret = cgroup_rm_cftypes_locked(cfts); in cgroup_rm_cftypes()
4022 static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_cftypes() argument
4029 if (!cfts || cfts[0].name[0] == '\0') in cgroup_add_cftypes()
4032 ret = cgroup_init_cftypes(ss, cfts); in cgroup_add_cftypes()
4038 list_add_tail(&cfts->node, &ss->cfts); in cgroup_add_cftypes()
4039 ret = cgroup_apply_cftypes(cfts, true); in cgroup_add_cftypes()
4041 cgroup_rm_cftypes_locked(cfts); in cgroup_add_cftypes()
4055 int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_dfl_cftypes() argument
4059 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_dfl_cftypes()
4061 return cgroup_add_cftypes(ss, cfts); in cgroup_add_dfl_cftypes()
4072 int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_legacy_cftypes() argument
4076 for (cft = cfts; cft && cft->name[0] != '\0'; cft++) in cgroup_add_legacy_cftypes()
4078 return cgroup_add_cftypes(ss, cfts); in cgroup_add_legacy_cftypes()
5585 INIT_LIST_HEAD(&ss->cfts); in cgroup_init_subsys()