Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:scrypt_file_open - prepare to open a possibly-encrypted regular file*@inode: the inode being opened*@filp: the struct file being set up* Currently, an encrypted regular file can only be opened if its encryption key

Proto:int fscrypt_file_open(struct inode *inode, struct file *filp)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct file *filp
35  err = scrypt_require_key - require an inode's encryption key*@inode: the inode we need the key for* If the inode is encrypted, set up its encryption key if not already done
36  If err Then Return err
39  dir = dget_parent(file_dentry(filp))
40  If IS_ENCRYPTED(d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.) && Not fscrypt_has_permitted_context(d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them., inode) Then
42  fscrypt_warn(inode, "Inconsistent encryption context (parent directory: %lu)", i_ino)
45  err = -EPERM
47  dput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
48  Return err