Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Retrieve an inode's encryption policy

Proto:static int fscrypt_get_policy(struct inode *inode, union fscrypt_policy *policy)

Type:int

Parameter:

TypeParameterName
struct inode *inode
union fscrypt_policy *policy
253  ci = READ_ONCE(i_crypt_info)
254  If ci Then
256  policy = The encryption policy used by this inode
257  Return 0
260  If Not IS_ENCRYPTED(inode) Then Return -ENODATA
263  ret = get_context(inode, & ctx, size of ctx )
264  If ret < 0 Then Return If ret == -ERANGE Then -EINVAL Else ret
267  Return scrypt_policy_from_context - convert an fscrypt_context to an fscrypt_policy* Given an fscrypt_context, build the corresponding fscrypt_policy.* Return: 0 on success, or -EINVAL if the fscrypt_context has an unrecognized* version number or size.