Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\device_cgroup.h Create Date:2022-07-28 20:04:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:devcgroup_inode_permission

Proto:static inline int devcgroup_inode_permission(struct inode *inode, int mask)

Type:int

Parameter:

TypeParameterName
struct inode *inode
intmask
26  access = 0
28  If Value is more likely to compile time(!i_rdev) Then Return 0
31  If S_ISBLK(i_mode) Then type = DEVCG_DEV_BLOCK
33  Else if S_ISCHR(i_mode) Then type = DEVCG_DEV_CHAR
35  Else Return 0
38  If mask & MAY_WRITE Then access |= DEVCG_ACC_WRITE
40  If mask & MAY_READ Then access |= DEVCG_ACC_READ
43  Return devcgroup_check_permission(type, imajor(inode), iminor(inode), access)
Caller
NameDescribe
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)