Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cgroup_file_write

Proto:static ssize_t cgroup_file_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

Type:ssize_t

Parameter:

TypeParameterName
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
3682  ns = cgroup_ns
3683  cgrp = priv
3684  cft = priv
3694  If Hierarchy-specific flags & CGRP_ROOT_NS_DELEGATE && Not (CFTYPE_* flags & CFTYPE_NS_DELEGATABLE) && ns != cgroup namespace for init task && he default cgroup associated with this css_set == cgrp Then Return -EPERM
3699  If write Then Return write(of, buf, nbytes, off)
3708  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
3709  css = group_css - obtain a cgroup's css for the specified subsystem*@cgrp: the cgroup of interest*@ss: the subsystem of interest (%NULL returns @cgrp->self)* Return @cgrp's css (cgroup_subsys_state) associated with @ss
3710  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
3712  If write_u64 Then
3714  ret = kstrtoull - convert a string to an unsigned long long*@s: The start of the string. The string must be null-terminated, and may also* include a single newline before its terminating null. The first character* may also be a plus sign, but not a minus sign.
3715  If Not ret Then ret = write_u64(css, cft, v)
3717  Else if write_s64 Then
3719  ret = kstrtoll - convert a string to a long long*@s: The start of the string. The string must be null-terminated, and may also* include a single newline before its terminating null. The first character* may also be a plus sign or a minus sign.
3720  If Not ret Then ret = write_s64(css, cft, v)
3722  Else
3723  ret = -EINVAL
3726  Return If ret Else nbytes