函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\device_cgroup.h Create Date:2022-07-29 10:34:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:devcgroup_inode_permission

函数原型:static inline int devcgroup_inode_permission(struct inode *inode, int mask)

返回类型:int

参数:

类型参数名称
struct inode *inode
intmask
26  access等于0
28  如果此条件成立可能性大(为编译器优化)(!i_rdev)则返回:0
31  如果S_ISBLK(i_mode)则type等于DEVCG_DEV_BLOCK
33  否则如果S_ISCHR(i_mode)则type等于DEVCG_DEV_CHAR
35  否则返回:0
38  如果mask按位与MAY_WRITEaccess或等于DEVCG_ACC_WRITE
40  如果mask按位与MAY_READaccess或等于DEVCG_ACC_READ
43  返回:devcgroup_check_permission(type, imajor(inode), iminor(inode), access)
调用者
名称描述
inode_permissionde_permission - Check for access rights to a given inode*@inode: Inode to check permission on*@mask: Right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC)* Check for read/write/execute permissions on an inode
__blkdev_getd_mutex locking:* mutex_lock(part->bd_mutex)* mutex_lock_nested(whole->bd_mutex, 1)