函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_show_path

函数原型:int cgroup_show_path(struct seq_file *sf, struct kernfs_node *kf_node, struct kernfs_root *kf_root)

返回类型:int

参数:

类型参数名称
struct seq_file *sf
struct kernfs_node *kf_node
struct kernfs_root *kf_root
1789  len等于0
1790  char * buf = NULL
1791  kf_cgroot等于cgroup_root_from_kf(kf_root)
1794  buf等于开辟内存
1795  如果非buf则返回:负ENOMEM
1798  spin_lock_irq( & css_set_lock)
1799  ns_cgroup等于look up cgroup associated with current task's cgroup namespace on the* specified hierarchy
1800  len等于kernfs_path_from_node(kf_node, cgroup kernfs entry , buf, # chars in a path name including nul )
1801  spin_unlock_irq( & css_set_lock)
1803  如果len大于等于# chars in a path name including nul len等于负ERANGE
1805  否则如果len大于0则
1806  seq_escape(sf, buf, " \t\n\\")
1807  len等于0
1809  kfree(buf)
1810  返回:len