函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_file_write

函数原型:static ssize_t cgroup_file_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

返回类型:ssize_t

参数:

类型参数名称
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
3682  ns等于cgroup_ns
3683  cgrp等于priv
3684  cft等于priv
3694  如果 Hierarchy-specific flags 按位与CGRP_ROOT_NS_DELEGATE且非CFTYPE_* flags 按位与CFTYPE_NS_DELEGATABLE的值且ns不等于cgroup namespace for init task he default cgroup associated with this css_set 恒等于cgrp则返回:负EPERM
3699  如果write则返回: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  如果write_u64
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  如果非retret等于write_u64(css, cft, v)
3717  否则如果write_s64
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  如果非retret等于write_s64(css, cft, v)
3722  否则
3723  ret等于负EINVAL
3726  返回:如果ret否则nbytes