Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__fscrypt_prepare_rename

Proto:int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry, unsigned int flags)

Type:int

Parameter:

TypeParameterName
struct inode *old_dir
struct dentry *old_dentry
struct inode *new_dir
struct dentry *new_dentry
unsigned intflags
78  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
79  If err Then Return err
82  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
83  If err Then Return err
87  If ( protected by d_lock | protected by d_lock ) & Encrypted name (dir key was unavailable) Then Return -ENOKEY
91  If old_dir != new_dir Then
92  If IS_ENCRYPTED(new_dir) && Not fscrypt_has_permitted_context(new_dir, 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.) Then Return -EXDEV
97  If flags & Exchange source and dest && IS_ENCRYPTED(old_dir) && Not fscrypt_has_permitted_context(old_dir, 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.) Then Return -EXDEV
103  Return 0
Caller
NameDescribe
fscrypt_prepare_renamescrypt_prepare_rename - prepare for a rename between possibly-encrypted directories*@old_dir: source directory*@old_dentry: dentry for source file*@new_dir: target directory*@new_dentry: dentry for target location (may be negative unless