Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:scrypt_inherit_context() - Sets a child context from its parent*@parent: Parent inode from which the context is inherited

Proto:int fscrypt_inherit_context(struct inode *parent, struct inode *child, void *fs_data, bool preload)

Type:int

Parameter:

TypeParameterName
struct inode *parent
struct inode *child
void *fs_data
boolpreload
516  res = fscrypt_get_encryption_info(parent)
517  If res < 0 Then Return res
520  ci = READ_ONCE(i_crypt_info)
521  If (ci == NULL) Then Return -ENOKEY
524  ctxsize = fscrypt_new_context_from_policy( & ctx, & The encryption policy used by this inode )
526  BUILD_BUG_ON - break compile if a condition is true( size of ctx != Maximum value for the third parameter of fscrypt_operations.set_context(). )
527  res = set_context(child, & ctx, ctxsize, fs_data)
528  If res Then Return res
530  Return If preload Then fscrypt_get_encryption_info(child) Else 0