Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cgroup_do_get_tree

Proto:int cgroup_do_get_tree(struct fs_context *fc)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
2026  ctx = cgroup_fc2context(fc)
2029  Root of the hierarchy being mounted = kf_root
2030  If fs_type == cgroup2_fs_type Then File system specific magic number = CGROUP2_SUPER_MAGIC
2032  Else File system specific magic number = CGROUP_SUPER_MAGIC
2034  ret = kernfs_get_tree(fc)
2040  If Not ret && ns != cgroup namespace for init task Then
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  If IS_ERR(nsdentry) Then
2057  ret = PTR_ERR(nsdentry)
2058  nsdentry = NULL
2060  root = nsdentry
2063  If Not Set to T if we allocated a new sb Then cgroup_put( & The root cgroup. Root is destroyed on its release. )
2066  Return ret
Caller
NameDescribe
cgroup_get_tree
cgroup1_get_tree