Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:group_get_from_fd - get a cgroup pointer from a fd*@fd: fd obtained by open(cgroup2_dir)* Find the cgroup from a fd which should be obtained* by opening a cgroup directory. Returns a pointer to the* cgroup on success. ERR_PTR is returned if the cgroup

Proto:struct cgroup *cgroup_get_from_fd(int fd)

Type:struct cgroup

Parameter:

TypeParameterName
intfd
6163  f = fget_raw(fd)
6164  If Not f Then Return ERR_PTR( - EBADF)
6167  css = ss_tryget_online_from_dir - get corresponding css from a cgroup dentry*@dentry: directory dentry of interest*@ss: subsystem of interest* If @dentry is a directory for a cgroup which has @ss enabled on it, try* to get the corresponding css and return it
6168  fput(f)
6169  If IS_ERR(css) Then Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
6172  cgrp = PI: the cgroup that this css is attached to
6173  If Not group_on_dfl - test whether a cgroup is on the default hierarchy*@cgrp: the cgroup of interest* The default hierarchy is the v2 interface of cgroup and this function* can be used to test whether a cgroup is on the default hierarchy for* cases where a Then
6174  cgroup_put(cgrp)
6175  Return ERR_PTR( - EBADF)
6178  Return cgrp
Caller
NameDescribe
cgroup_fd_array_get_ptr
cgroup_bpf_prog_attach
cgroup_bpf_prog_detach
cgroup_bpf_prog_query