Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cgroup_show_path

Proto:int cgroup_show_path(struct seq_file *sf, struct kernfs_node *kf_node, struct kernfs_root *kf_root)

Type:int

Parameter:

TypeParameterName
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 = Allocation memory
1795  If Not buf Then Return -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  If len >= # chars in a path name including nul Then len = -ERANGE
1805  Else if len > 0 Then
1806  seq_escape(sf, buf, " \t\n\\")
1807  len = 0
1809  kfree(buf)
1810  Return len