Lines Matching refs:root
59 struct cgroup_root *root; in cgroup_attach_task_all() local
65 for_each_root(root) { in cgroup_attach_task_all()
68 if (root == &cgrp_dfl_root) in cgroup_attach_task_all()
72 from_cgrp = task_cgroup_from_root(from, root); in cgroup_attach_task_all()
558 BUILD_BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX); in cgroup_release_agent_write()
573 strlcpy(cgrp->root->release_agent_path, strstrip(buf), in cgroup_release_agent_write()
574 sizeof(cgrp->root->release_agent_path)); in cgroup_release_agent_write()
585 seq_puts(seq, cgrp->root->release_agent_path); in cgroup_release_agent_show()
690 ss->legacy_name, ss->root->hierarchy_id, in proc_cgroupstats_show()
691 atomic_read(&ss->root->nr_cgrps), in proc_cgroupstats_show()
803 if (!cgrp->root->release_agent_path[0]) in cgroup1_release_agent()
813 strlcpy(agentbuf, cgrp->root->release_agent_path, PATH_MAX); in cgroup1_release_agent()
878 struct cgroup_root *root = cgroup_root_from_kf(kf_root); in cgroup1_show_options() local
883 if (root->subsys_mask & (1 << ssid)) in cgroup1_show_options()
885 if (root->flags & CGRP_ROOT_NOPREFIX) in cgroup1_show_options()
887 if (root->flags & CGRP_ROOT_XATTR) in cgroup1_show_options()
889 if (root->flags & CGRP_ROOT_CPUSET_V2_MODE) in cgroup1_show_options()
893 if (strlen(root->release_agent_path)) in cgroup1_show_options()
895 root->release_agent_path); in cgroup1_show_options()
898 if (test_bit(CGRP_CPUSET_CLONE_CHILDREN, &root->cgrp.flags)) in cgroup1_show_options()
900 if (strlen(root->name)) in cgroup1_show_options()
901 seq_show_option(seq, "name", root->name); in cgroup1_show_options()
1074 struct kernfs_root *kf_root = kernfs_root_from_sb(fc->root->d_sb); in cgroup1_reconfigure()
1075 struct cgroup_root *root = cgroup_root_from_kf(kf_root); in cgroup1_reconfigure() local
1086 if (ctx->subsys_mask != root->subsys_mask || ctx->release_agent) in cgroup1_reconfigure()
1090 added_mask = ctx->subsys_mask & ~root->subsys_mask; in cgroup1_reconfigure()
1091 removed_mask = root->subsys_mask & ~ctx->subsys_mask; in cgroup1_reconfigure()
1094 if ((ctx->flags ^ root->flags) || in cgroup1_reconfigure()
1095 (ctx->name && strcmp(ctx->name, root->name))) { in cgroup1_reconfigure()
1097 ctx->flags, ctx->name ?: "", root->flags, root->name); in cgroup1_reconfigure()
1103 if (!list_empty(&root->cgrp.self.children)) { in cgroup1_reconfigure()
1108 ret = rebind_subsystems(root, added_mask); in cgroup1_reconfigure()
1116 strcpy(root->release_agent_path, ctx->release_agent); in cgroup1_reconfigure()
1120 trace_cgroup_remount(root); in cgroup1_reconfigure()
1146 struct cgroup_root *root; in cgroup1_root_to_use() local
1164 ss->root == &cgrp_dfl_root) in cgroup1_root_to_use()
1167 if (!percpu_ref_tryget_live(&ss->root->cgrp.self.refcnt)) in cgroup1_root_to_use()
1169 cgroup_put(&ss->root->cgrp); in cgroup1_root_to_use()
1172 for_each_root(root) { in cgroup1_root_to_use()
1175 if (root == &cgrp_dfl_root) in cgroup1_root_to_use()
1184 if (strcmp(ctx->name, root->name)) in cgroup1_root_to_use()
1194 (ctx->subsys_mask != root->subsys_mask)) { in cgroup1_root_to_use()
1200 if (root->flags ^ ctx->flags) in cgroup1_root_to_use()
1203 ctx->root = root; in cgroup1_root_to_use()
1219 root = kzalloc(sizeof(*root), GFP_KERNEL); in cgroup1_root_to_use()
1220 if (!root) in cgroup1_root_to_use()
1223 ctx->root = root; in cgroup1_root_to_use()
1226 ret = cgroup_setup_root(root, ctx->subsys_mask); in cgroup1_root_to_use()
1228 cgroup_free_root(root); in cgroup1_root_to_use()
1244 if (!ret && !percpu_ref_tryget_live(&ctx->root->cgrp.self.refcnt)) in cgroup1_get_tree()
1252 if (!ret && percpu_ref_is_dying(&ctx->root->cgrp.self.refcnt)) { in cgroup1_get_tree()