函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_do_get_tree

函数原型:int cgroup_do_get_tree(struct fs_context *fc)

返回类型:int

参数:

类型参数名称
struct fs_context *fc
2026  ctx等于cgroup_fc2context(fc)
2029  Root of the hierarchy being mounted 等于kf_root
2030  如果fs_type恒等于cgroup2_fs_type File system specific magic number 等于CGROUP2_SUPER_MAGIC
2032  否则 File system specific magic number 等于CGROUP_SUPER_MAGIC
2034  ret等于kernfs_get_tree(fc)
2040  如果非retns不等于cgroup namespace for init task
2042  sb等于d_sb
2045  mutex_lock( & cgroup_mutex is the master lock)
2046  spin_lock_irq( & css_set_lock)
2048  cgrp等于look up cgroup associated with given css_set on the specified hierarchy
2050  spin_unlock_irq( & css_set_lock)
2051  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
2053  nsdentry等于kernfs_node_dentry( cgroup kernfs entry , sb)
2054  dput(root)
2055  如果是错误
2057  ret等于错误
2058  nsdentry = NULL
2060  root等于nsdentry
2063  如果非 Set to T if we allocated a new sb cgroup_put( & The root cgroup. Root is destroyed on its release. )
2066  返回:ret
调用者
名称描述
cgroup_get_tree
cgroup1_get_tree