Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-28 20:05:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:We _really_ want to just do "generic_permission()" without* even looking at the inode->i_op values. So we keep a cache* flag in inode->i_opflags, that says "this has not special* permission function, use the fast case".

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

Type:int

Parameter:

TypeParameterName
struct inode *inode
intmask
382  If Value for the false possibility is greater at compile time(!(i_opflags & IOP_FASTPERM)) Then
383  If Value is more likely to compile time(permission) Then Return permission(inode, mask)
387  spin_lock( & _blocks, i_bytes, maybe i_size )
388  i_opflags |= IOP_FASTPERM
389  spin_unlock( & _blocks, i_bytes, maybe i_size )
391  Return generic_permission - check for access rights on a Posix-like filesystem*@inode: inode to check access rights for*@mask: right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC,
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