函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_mkdir

函数原型:int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name, umode_t mode)

返回类型:int

参数:

类型参数名称
struct kernfs_node *parent_kn
const char *name
umode_tmode
5296  如果strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for则返回:负EINVAL
5299  parent等于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
5300  如果非parent则返回:负ENODEV
5303  如果非cgroup_check_hierarchy_limits(parent)则
5304  ret等于负EAGAIN
5305  转到:out_unlock
5308  cgrp等于The returned cgroup is fully initialized including its control mask, but* it isn't associated with its kernfs_node and doesn't have the control* mask applied.
5309  如果是错误
5310  ret等于错误
5311  转到:out_unlock
5318  kernfs_get( cgroup kernfs entry )
5320  ret等于set uid and gid of cgroup dirs and files to that of the creator
5321  如果ret则转到:out_destroy
5324  ret等于ss_populate_dir - create subsys files in a cgroup directory*@css: target css* On failure, no file is added.
5325  如果ret则转到:out_destroy
5328  ret等于group_apply_control_enable - enable or show csses according to control*@cgrp: root of the target subtree* Walk @cgrp's subtree and create new csses or make the existing ones* visible. A css is created invisible if it's being implicitly enabled
5329  如果ret则转到:out_destroy
5332  cgroup_path() takes a spin lock(mkdir, cgrp)
5335  kernfs_activate( cgroup kernfs entry )
5337  ret等于0
5338  转到:out_unlock
5340  out_destroy :
5341  group_destroy_locked - the first stage of cgroup destruction*@cgrp: cgroup to be destroyed* css's make use of percpu refcnts whose killing latency shouldn't be* exposed to userland and are RCU protected
5342  out_unlock :
5343  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
5344  返回:ret