• Home
  • Raw
  • Download

Lines Matching refs:root

324 	struct cgroupfs_root *root = cgrp->root;  in find_existing_css_set()  local
332 if (root->subsys_bits & (1UL << i)) { in find_existing_css_set()
466 if (ss->root->subsys_list.next == &ss->sibling) in find_css_set()
592 for_each_subsys(cgrp->root, ss) in cgroup_call_pre_destroy()
624 for_each_subsys(cgrp->root, ss) in cgroup_diput()
627 cgrp->root->number_of_cgroups--; in cgroup_diput()
634 deactivate_super(cgrp->root->sb); in cgroup_diput()
689 static int rebind_subsystems(struct cgroupfs_root *root, in rebind_subsystems() argument
693 struct cgroup *cgrp = &root->top_cgroup; in rebind_subsystems()
696 removed_bits = root->actual_subsys_bits & ~final_bits; in rebind_subsystems()
697 added_bits = final_bits & ~root->actual_subsys_bits; in rebind_subsystems()
704 if (ss->root != &rootnode) { in rebind_subsystems()
714 if (root->number_of_cgroups > 1) in rebind_subsystems()
729 list_move(&ss->sibling, &root->subsys_list); in rebind_subsystems()
730 ss->root = root; in rebind_subsystems()
743 subsys[i]->root = &rootnode; in rebind_subsystems()
754 root->subsys_bits = root->actual_subsys_bits = final_bits; in rebind_subsystems()
762 struct cgroupfs_root *root = vfs->mnt_sb->s_fs_info; in cgroup_show_options() local
766 for_each_subsys(root, ss) in cgroup_show_options()
768 if (test_bit(ROOT_NOPREFIX, &root->flags)) in cgroup_show_options()
770 if (strlen(root->release_agent_path)) in cgroup_show_options()
771 seq_printf(seq, ",release_agent=%s", root->release_agent_path); in cgroup_show_options()
842 struct cgroupfs_root *root = sb->s_fs_info; in cgroup_remount() local
843 struct cgroup *cgrp = &root->top_cgroup; in cgroup_remount()
855 if (opts.flags != root->flags) { in cgroup_remount()
860 ret = rebind_subsystems(root, opts.subsys_bits); in cgroup_remount()
867 strcpy(root->release_agent_path, opts.release_agent); in cgroup_remount()
891 static void init_cgroup_root(struct cgroupfs_root *root) in init_cgroup_root() argument
893 struct cgroup *cgrp = &root->top_cgroup; in init_cgroup_root()
894 INIT_LIST_HEAD(&root->subsys_list); in init_cgroup_root()
895 INIT_LIST_HEAD(&root->root_list); in init_cgroup_root()
896 root->number_of_cgroups = 1; in init_cgroup_root()
897 cgrp->root = root; in init_cgroup_root()
905 struct cgroupfs_root *root = sb->s_fs_info; in cgroup_test_super() local
908 if (new->subsys_bits != root->subsys_bits) in cgroup_test_super()
912 if (new->flags != root->flags) in cgroup_test_super()
921 struct cgroupfs_root *root = data; in cgroup_set_super() local
927 sb->s_fs_info = root; in cgroup_set_super()
928 root->sb = sb; in cgroup_set_super()
967 struct cgroupfs_root *root; in cgroup_get_sb() local
978 root = kzalloc(sizeof(*root), GFP_KERNEL); in cgroup_get_sb()
979 if (!root) { in cgroup_get_sb()
985 init_cgroup_root(root); in cgroup_get_sb()
986 root->subsys_bits = opts.subsys_bits; in cgroup_get_sb()
987 root->flags = opts.flags; in cgroup_get_sb()
989 strcpy(root->release_agent_path, opts.release_agent); in cgroup_get_sb()
993 sb = sget(fs_type, cgroup_test_super, cgroup_set_super, root); in cgroup_get_sb()
996 kfree(root); in cgroup_get_sb()
1000 if (sb->s_fs_info != root) { in cgroup_get_sb()
1003 kfree(root); in cgroup_get_sb()
1004 root = NULL; in cgroup_get_sb()
1007 struct cgroup *root_cgrp = &root->top_cgroup; in cgroup_get_sb()
1035 ret = rebind_subsystems(root, root->subsys_bits); in cgroup_get_sb()
1045 list_add(&root->root_list, &roots); in cgroup_get_sb()
1049 root->top_cgroup.dentry = sb->s_root; in cgroup_get_sb()
1068 BUG_ON(root->number_of_cgroups != 1); in cgroup_get_sb()
1086 struct cgroupfs_root *root = sb->s_fs_info; in cgroup_kill_sb() local
1087 struct cgroup *cgrp = &root->top_cgroup; in cgroup_kill_sb()
1092 BUG_ON(!root); in cgroup_kill_sb()
1094 BUG_ON(root->number_of_cgroups != 1); in cgroup_kill_sb()
1101 ret = rebind_subsystems(root, 0); in cgroup_kill_sb()
1119 if (!list_empty(&root->root_list)) { in cgroup_kill_sb()
1120 list_del(&root->root_list); in cgroup_kill_sb()
1127 kfree(root); in cgroup_kill_sb()
1200 const struct cgroupfs_root *root = cgrp->root; in get_first_subsys() local
1202 BUG_ON(list_empty(&root->subsys_list)); in get_first_subsys()
1203 test_ss = list_entry(root->subsys_list.next, in get_first_subsys()
1228 struct cgroupfs_root *root = cgrp->root; in cgroup_attach_task() local
1238 for_each_subsys(root, ss) { in cgroup_attach_task()
1285 for_each_subsys(root, ss) { in cgroup_attach_task()
1362 BUILD_BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX); in cgroup_release_agent_write()
1365 strcpy(cgrp->root->release_agent_path, buffer); in cgroup_release_agent_write()
1375 seq_puts(seq, cgrp->root->release_agent_path); in cgroup_release_agent_show()
1680 error = cgroup_create_file(dentry, S_IFDIR | mode, cgrp->root->sb); in cgroup_create_dir()
1701 if (subsys && !test_bit(ROOT_NOPREFIX, &cgrp->root->flags)) { in cgroup_add_file()
1710 cgrp->root->sb); in cgroup_add_file()
2326 for_each_subsys(cgrp->root, ss) { in cgroup_populate_dir()
2347 static void cgroup_lock_hierarchy(struct cgroupfs_root *root) in cgroup_lock_hierarchy() argument
2354 if (ss->root == root) in cgroup_lock_hierarchy()
2359 static void cgroup_unlock_hierarchy(struct cgroupfs_root *root) in cgroup_unlock_hierarchy() argument
2365 if (ss->root == root) in cgroup_unlock_hierarchy()
2382 struct cgroupfs_root *root = parent->root; in cgroup_create() local
2385 struct super_block *sb = root->sb; in cgroup_create()
2403 cgrp->root = parent->root; in cgroup_create()
2409 for_each_subsys(root, ss) { in cgroup_create()
2418 cgroup_lock_hierarchy(root); in cgroup_create()
2420 cgroup_unlock_hierarchy(root); in cgroup_create()
2421 root->number_of_cgroups++; in cgroup_create()
2440 cgroup_lock_hierarchy(root); in cgroup_create()
2442 cgroup_unlock_hierarchy(root); in cgroup_create()
2443 root->number_of_cgroups--; in cgroup_create()
2447 for_each_subsys(root, ss) { in cgroup_create()
2485 if (ss->root != cgrp->root) in cgroup_has_css_refs()
2512 for_each_subsys(cgrp->root, ss) { in cgroup_clear_css_refs()
2535 for_each_subsys(cgrp->root, ss) { in cgroup_clear_css_refs()
2594 cgroup_lock_hierarchy(cgrp->root); in cgroup_rmdir()
2597 cgroup_unlock_hierarchy(cgrp->root); in cgroup_rmdir()
2621 ss->root = &rootnode; in cgroup_init_subsys()
2749 struct cgroupfs_root *root; in proc_cgroup_show() local
2766 for_each_active_root(root) { in proc_cgroup_show()
2772 seq_printf(m, "%lu:", root->subsys_bits); in proc_cgroup_show()
2773 for_each_subsys(root, ss) in proc_cgroup_show()
2776 get_first_subsys(&root->top_cgroup, NULL, &subsys_id); in proc_cgroup_show()
2817 ss->name, ss->root->subsys_bits, in proc_cgroupstats_show()
2818 ss->root->number_of_cgroups, !ss->disabled); in proc_cgroupstats_show()
2988 struct cgroupfs_root *root; in cgroup_clone() local
2998 root = subsys->root; in cgroup_clone()
2999 if (root == &rootnode) { in cgroup_clone()
3005 if (!atomic_inc_not_zero(&root->sb->s_active)) { in cgroup_clone()
3050 if ((root != subsys->root) || in cgroup_clone()
3056 deactivate_super(root->sb); in cgroup_clone()
3067 for_each_subsys(root, ss) { in cgroup_clone()
3082 deactivate_super(root->sb); in cgroup_clone()
3191 agentbuf = kstrdup(cgrp->root->release_agent_path, GFP_KERNEL); in cgroup_release_agent()