函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cgroup.c Create Date:2022-07-27 12:09:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:group_kn_lock_live - locking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced*@drain_offline: perform offline draining on the cgroup* This helper is to be used by a cgroup kernfs method currently servicing*@kn

函数原型:struct cgroup *cgroup_kn_lock_live(struct kernfs_node *kn, bool drain_offline)

返回类型:struct cgroup

参数:

类型参数名称
struct kernfs_node *kn
booldrain_offline
1596  如果kernfs_type(kn)恒等于KERNFS_DIRcgrp等于priv
1598  否则cgrp等于priv
1607  如果非cgroup_tryget(cgrp)则返回:NULL
1609  kernfs_break_active_protection(kn)
1611  如果drain_offlinegroup_lock_and_drain_offline - lock cgroup_mutex and drain offlined csses*@cgrp: root of the target subtree* Because css offlining is asynchronous, userland may try to re-enable a* controller while the previous css is still around. This function grabs
1613  否则mutex_lock( & cgroup_mutex is the master lock)
1616  如果非cgroup_is_dead(cgrp)则返回:cgrp
1619  group_kn_unlock - unlocking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced* This helper undoes cgroup_kn_lock_live() and should be invoked before* the method finishes if locking succeeded
1620  返回:NULL
调用者
名称描述
cgroup_subtree_control_writehange the enabled child controllers for a cgroup in the default hierarchy
cgroup_type_write
cgroup_max_descendants_write
cgroup_max_depth_write
cgroup_freeze_write
cgroup_procs_write
cgroup_threads_write
cgroup_mkdir
cgroup_rmdirput the base reference
__cgroup1_procs_write
cgroup_release_agent_write
current_css_set_read
cgroup_subsys_states_read
cgroup_masks_read