Lines Matching refs:root
59 struct cgroup_root *root; in cgroup_attach_task_all() local
64 for_each_root(root) { in cgroup_attach_task_all()
68 from_cgrp = task_cgroup_from_root(from, root); in cgroup_attach_task_all()
553 BUILD_BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX); in cgroup_release_agent_write()
568 strlcpy(cgrp->root->release_agent_path, strstrip(buf), in cgroup_release_agent_write()
569 sizeof(cgrp->root->release_agent_path)); in cgroup_release_agent_write()
580 seq_puts(seq, cgrp->root->release_agent_path); in cgroup_release_agent_show()
683 ss->legacy_name, ss->root->hierarchy_id, in proc_cgroupstats_show()
684 atomic_read(&ss->root->nr_cgrps), in proc_cgroupstats_show()
792 if (!cgrp->root->release_agent_path[0]) in cgroup1_release_agent()
802 strlcpy(agentbuf, cgrp->root->release_agent_path, PATH_MAX); in cgroup1_release_agent()
867 struct cgroup_root *root = cgroup_root_from_kf(kf_root); in cgroup1_show_options() local
872 if (root->subsys_mask & (1 << ssid)) in cgroup1_show_options()
874 if (root->flags & CGRP_ROOT_NOPREFIX) in cgroup1_show_options()
876 if (root->flags & CGRP_ROOT_XATTR) in cgroup1_show_options()
878 if (root->flags & CGRP_ROOT_CPUSET_V2_MODE) in cgroup1_show_options()
880 if (root->flags & CGRP_ROOT_FAVOR_DYNMODS) in cgroup1_show_options()
884 if (strlen(root->release_agent_path)) in cgroup1_show_options()
886 root->release_agent_path); in cgroup1_show_options()
889 if (test_bit(CGRP_CPUSET_CLONE_CHILDREN, &root->cgrp.flags)) in cgroup1_show_options()
891 if (strlen(root->name)) in cgroup1_show_options()
892 seq_show_option(seq, "name", root->name); in cgroup1_show_options()
1075 struct kernfs_root *kf_root = kernfs_root_from_sb(fc->root->d_sb); in cgroup1_reconfigure()
1076 struct cgroup_root *root = cgroup_root_from_kf(kf_root); in cgroup1_reconfigure() local
1087 if (ctx->subsys_mask != root->subsys_mask || ctx->release_agent) in cgroup1_reconfigure()
1091 added_mask = ctx->subsys_mask & ~root->subsys_mask; in cgroup1_reconfigure()
1092 removed_mask = root->subsys_mask & ~ctx->subsys_mask; in cgroup1_reconfigure()
1095 if ((ctx->flags ^ root->flags) || in cgroup1_reconfigure()
1096 (ctx->name && strcmp(ctx->name, root->name))) { in cgroup1_reconfigure()
1098 ctx->flags, ctx->name ?: "", root->flags, root->name); in cgroup1_reconfigure()
1104 if (!list_empty(&root->cgrp.self.children)) { in cgroup1_reconfigure()
1109 ret = rebind_subsystems(root, added_mask); in cgroup1_reconfigure()
1117 strcpy(root->release_agent_path, ctx->release_agent); in cgroup1_reconfigure()
1121 trace_cgroup_remount(root); in cgroup1_reconfigure()
1147 struct cgroup_root *root; in cgroup1_root_to_use() local
1165 ss->root == &cgrp_dfl_root) in cgroup1_root_to_use()
1168 if (!percpu_ref_tryget_live(&ss->root->cgrp.self.refcnt)) in cgroup1_root_to_use()
1170 cgroup_put(&ss->root->cgrp); in cgroup1_root_to_use()
1173 for_each_root(root) { in cgroup1_root_to_use()
1176 if (root == &cgrp_dfl_root) in cgroup1_root_to_use()
1185 if (strcmp(ctx->name, root->name)) in cgroup1_root_to_use()
1195 (ctx->subsys_mask != root->subsys_mask)) { in cgroup1_root_to_use()
1201 if (root->flags ^ ctx->flags) in cgroup1_root_to_use()
1204 ctx->root = root; in cgroup1_root_to_use()
1220 root = kzalloc(sizeof(*root), GFP_KERNEL); in cgroup1_root_to_use()
1221 if (!root) in cgroup1_root_to_use()
1224 ctx->root = root; in cgroup1_root_to_use()
1227 ret = cgroup_setup_root(root, ctx->subsys_mask); in cgroup1_root_to_use()
1229 cgroup_favor_dynmods(root, ctx->flags & CGRP_ROOT_FAVOR_DYNMODS); in cgroup1_root_to_use()
1231 cgroup_free_root(root); in cgroup1_root_to_use()
1248 if (!ret && !percpu_ref_tryget_live(&ctx->root->cgrp.self.refcnt)) in cgroup1_get_tree()
1256 if (!ret && percpu_ref_is_dying(&ctx->root->cgrp.self.refcnt)) { in cgroup1_get_tree()