函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cgroup_max_depth_write

函数原型:static ssize_t cgroup_max_depth_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
3470  buf等于strstrip(buf)
3471  如果非字符串比较
3472  depth等于INT_MAX
3473  否则
3474  ret等于kstrtoint - convert a string to an int*@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.
3475  如果ret则返回:ret
3479  如果depth小于0则返回:负ERANGE
3482  cgrp等于group_kn_lock_live - locking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced*@drain_offline: perform offline draining on the cgroup* This helper is to be used by a cgroup kernfs method currently servicing*@kn
3483  如果非cgrp则返回:负ENOENT
3486  Maximum allowed descent tree depth 等于depth
3488  group_kn_unlock - unlocking helper for cgroup kernfs methods*@kn: the kernfs_node being serviced* This helper undoes cgroup_kn_lock_live() and should be invoked before* the method finishes if locking succeeded
3490  返回:nbytes