Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:group_get_from_path - lookup and get a cgroup from its default hierarchy path*@path: path on the default hierarchy* Find the cgroup at @path on the default hierarchy, increment its* reference count and return it

Proto:struct cgroup *cgroup_get_from_path(const char *path)

Type:struct cgroup

Parameter:

TypeParameterName
const char *path
6128  mutex_lock( & cgroup_mutex is the master lock)
6130  kn = kernfs_walk_and_get( cgroup kernfs entry , path)
6131  If kn Then
6132  If kernfs_type(kn) == KERNFS_DIR Then
6133  cgrp = priv
6135  Else
6136  cgrp = ERR_PTR( - ENOTDIR)
6138  kernfs_put(kn)
6139  Else
6140  cgrp = ERR_PTR( - ENOENT)
6143  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.
6144  Return cgrp