Lines Matching refs:goals
957 struct damos_sysfs_quota_goals *goals) in damos_sysfs_quota_goals_rm_dirs() argument
959 struct damos_sysfs_quota_goal **goals_arr = goals->goals_arr; in damos_sysfs_quota_goals_rm_dirs()
962 for (i = 0; i < goals->nr; i++) in damos_sysfs_quota_goals_rm_dirs()
964 goals->nr = 0; in damos_sysfs_quota_goals_rm_dirs()
966 goals->goals_arr = NULL; in damos_sysfs_quota_goals_rm_dirs()
970 struct damos_sysfs_quota_goals *goals, int nr_goals) in damos_sysfs_quota_goals_add_dirs() argument
975 damos_sysfs_quota_goals_rm_dirs(goals); in damos_sysfs_quota_goals_add_dirs()
983 goals->goals_arr = goals_arr; in damos_sysfs_quota_goals_add_dirs()
988 damos_sysfs_quota_goals_rm_dirs(goals); in damos_sysfs_quota_goals_add_dirs()
993 &damos_sysfs_quota_goal_ktype, &goals->kobj, in damos_sysfs_quota_goals_add_dirs()
997 damos_sysfs_quota_goals_rm_dirs(goals); in damos_sysfs_quota_goals_add_dirs()
1002 goals->nr++; in damos_sysfs_quota_goals_add_dirs()
1010 struct damos_sysfs_quota_goals *goals = container_of(kobj, in nr_goals_show() local
1013 return sysfs_emit(buf, "%d\n", goals->nr); in nr_goals_show()
1019 struct damos_sysfs_quota_goals *goals; in nr_goals_store() local
1027 goals = container_of(kobj, struct damos_sysfs_quota_goals, kobj); in nr_goals_store()
1031 err = damos_sysfs_quota_goals_add_dirs(goals, nr); in nr_goals_store()
1177 struct damos_sysfs_quota_goals *goals; member
1192 struct damos_sysfs_quota_goals *goals; in damon_sysfs_quotas_add_dirs() local
1207 goals = damos_sysfs_quota_goals_alloc(); in damon_sysfs_quotas_add_dirs()
1208 if (!goals) { in damon_sysfs_quotas_add_dirs()
1212 err = kobject_init_and_add(&goals->kobj, in damon_sysfs_quotas_add_dirs()
1217 kobject_put(&goals->kobj); in damon_sysfs_quotas_add_dirs()
1219 quotas->goals = goals; in damon_sysfs_quotas_add_dirs()
1228 damos_sysfs_quota_goals_rm_dirs(quotas->goals); in damon_sysfs_quotas_rm_dirs()
1229 kobject_put("as->goals->kobj); in damon_sysfs_quotas_rm_dirs()
1982 INIT_LIST_HEAD("a.goals); in damos_sysfs_set_quota_scores()
1993 err = damos_sysfs_add_quota_score(sysfs_scheme->quotas->goals, in damos_sysfs_set_quota_scores()
2073 err = damos_sysfs_add_quota_score(sysfs_quotas->goals, &scheme->quota); in damon_sysfs_mk_scheme()