Lines Matching refs:id
336 static void *cgroup_idr_replace(struct idr *idr, void *ptr, int id) in cgroup_idr_replace() argument
341 ret = idr_replace(idr, ptr, id); in cgroup_idr_replace()
346 static void cgroup_idr_remove(struct idr *idr, int id) in cgroup_idr_remove() argument
349 idr_remove(idr, id); in cgroup_idr_remove()
489 return rcu_dereference_check(cgrp->subsys[ss->id], in cgroup_css()
539 while (!(cgroup_ss_mask(cgrp) & (1 << ss->id))) { in cgroup_e_css_by_mask()
577 return init_css_set.subsys[ss->id]; in cgroup_e_css()
609 css = init_css_set.subsys[ss->id]; in cgroup_get_e_css()
670 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]); in of_css()
1332 int id; in cgroup_init_root_id() local
1336 id = idr_alloc_cyclic(&cgroup_hierarchy_idr, root, 0, 0, GFP_KERNEL); in cgroup_init_root_id()
1337 if (id < 0) in cgroup_init_root_id()
1338 return id; in cgroup_init_root_id()
1340 root->hierarchy_id = id; in cgroup_init_root_id()
1853 WARN_ON(!list_empty(&dcgrp->e_csets[ss->id])); in rebind_subsystems()
1854 list_for_each_entry_safe(cset, cset_pos, &scgrp->e_csets[ss->id], in rebind_subsystems()
1855 e_cset_node[ss->id]) { in rebind_subsystems()
1856 list_move_tail(&cset->e_cset_node[ss->id], in rebind_subsystems()
1857 &dcgrp->e_csets[ss->id]); in rebind_subsystems()
1866 if (it->cset_head == &scgrp->e_csets[ss->id]) in rebind_subsystems()
1867 it->cset_head = &dcgrp->e_csets[ss->id]; in rebind_subsystems()
3227 if (cgroup_control(cgrp) & (1 << ss->id)) in css_visible()
3229 if (!(cgroup_ss_mask(cgrp) & (1 << ss->id))) in css_visible()
3258 if (!(cgroup_ss_mask(dsct) & (1 << ss->id))) in cgroup_apply_control_enable()
3310 !(cgroup_ss_mask(dsct) & (1 << ss->id))) { in cgroup_apply_control_disable()
4430 if (!cgroup_ssid_enabled(ss->id)) in cgroup_add_cftypes()
4792 cset = container_of(l, struct css_set, e_cset_node[it->ss->id]); in css_task_iter_next_css_set()
4955 it->cset_pos = &css->cgroup->e_csets[css->ss->id]; in css_task_iter_start()
5379 int id = css->id; in css_free_rwork_fn() local
5382 cgroup_idr_remove(&ss->css_idr, id); in css_free_rwork_fn()
5435 cgroup_idr_replace(&ss->css_idr, NULL, css->id); in css_release_work_fn()
5489 css->id = -1; in init_and_link_css()
5519 rcu_assign_pointer(css->cgroup->subsys[ss->id], css); in online_css()
5542 RCU_INIT_POINTER(css->cgroup->subsys[ss->id], NULL); in offline_css()
5581 css->id = err; in css_create()
5585 cgroup_idr_replace(&ss->css_idr, css, css->id); in css_create()
6025 css->id = 1; in cgroup_init_subsys()
6027 css->id = cgroup_idr_alloc(&ss->css_idr, css, 1, 2, GFP_KERNEL); in cgroup_init_subsys()
6028 BUG_ON(css->id < 0); in cgroup_init_subsys()
6035 init_css_set.subsys[ss->id] = css; in cgroup_init_subsys()
6037 have_fork_callback |= (bool)ss->fork << ss->id; in cgroup_init_subsys()
6038 have_exit_callback |= (bool)ss->exit << ss->id; in cgroup_init_subsys()
6039 have_release_callback |= (bool)ss->release << ss->id; in cgroup_init_subsys()
6040 have_canfork_callback |= (bool)ss->can_fork << ss->id; in cgroup_init_subsys()
6071 WARN(!ss->css_alloc || !ss->css_free || ss->name || ss->id, in cgroup_init_early()
6074 ss->id, ss->name); in cgroup_init_early()
6078 ss->id = i; in cgroup_init_early()
6125 init_css_set.subsys[ss->id]; in cgroup_init()
6127 css->id = cgroup_idr_alloc(&ss->css_idr, css, 1, 2, in cgroup_init()
6129 BUG_ON(css->id < 0); in cgroup_init()
6149 cgrp_dfl_root.subsys_mask |= 1 << ss->id; in cgroup_init()
6155 cgrp_dfl_implicit_ss_mask |= 1 << ss->id; in cgroup_init()
6157 cgrp_dfl_inhibit_ss_mask |= 1 << ss->id; in cgroup_init()
6160 cgrp_dfl_threaded_ss_mask |= 1 << ss->id; in cgroup_init()
6209 void cgroup_path_from_kernfs_id(u64 id, char *buf, size_t buflen) in cgroup_path_from_kernfs_id() argument
6213 kn = kernfs_find_and_get_node_by_id(cgrp_dfl_root.kf_root, id); in cgroup_path_from_kernfs_id()
6226 struct cgroup *cgroup_get_from_id(u64 id) in cgroup_get_from_id() argument
6231 kn = kernfs_find_and_get_node_by_id(cgrp_dfl_root.kf_root, id); in cgroup_get_from_id()
6838 struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss) in css_from_id() argument
6841 return idr_find(&ss->css_idr, id); in css_from_id()