Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cgroup.c Create Date:2022-07-28 11:08:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:struct cgroup *cgroup_kn_lock_live(struct kernfs_node *kn, bool drain_offline)

Type:struct cgroup

Parameter:

TypeParameterName
struct kernfs_node *kn
booldrain_offline
1596  If kernfs_type(kn) == KERNFS_DIR Then cgrp = priv
1598  Else cgrp = priv
1607  If Not cgroup_tryget(cgrp) Then Return NULL
1609  kernfs_break_active_protection(kn)
1611  If drain_offline Then group_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  Else mutex_lock( & cgroup_mutex is the master lock)
1616  If Not cgroup_is_dead(cgrp) Then Return 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  Return NULL
Caller
NameDescribe
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