函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\policy.c Create Date:2022-07-29 10:57:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:int fscrypt_inherit_context(struct inode *parent, struct inode *child, void *fs_data, bool preload)

返回类型:int

参数:

类型参数名称
struct inode *parent
struct inode *child
void *fs_data
boolpreload
516  res等于fscrypt_get_encryption_info(parent)
517  如果res小于0则返回:res
520  ci等于READ_ONCE(i_crypt_info)
521  如果(ci == NULL)则返回:负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(ctx的长度 != Maximum value for the third parameter of fscrypt_operations.set_context(). )
527  res等于set_context(child, & ctx, ctxsize, fs_data)
528  如果res则返回:res
530  返回:如果preloadfscrypt_get_encryption_info(child)否则0