Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:scrypt_decrypt_pagecache_blocks() - Decrypt filesystem blocks in a pagecache page*@page: The locked pagecache page containing the block(s) to decrypt*@len: Total size of the block(s) to decrypt. Must be a nonzero* multiple of the filesystem's block size.

Proto:int fscrypt_decrypt_pagecache_blocks(struct page *page, unsigned int len, unsigned int offs)

Type:int

Parameter:

TypeParameterName
struct page *page
unsigned intlen
unsigned intoffs
240  inode = host
241  blockbits = i_blkbits
242  blocksize = 1 << blockbits
243  lblk_num = ( Our offset within mapping. << PAGE_SHIFT determines the page size - blockbits ) + (offs >> blockbits)
248  If WARN_ON_ONCE(!PageLocked(page)) Then Return -EINVAL
251  If WARN_ON_ONCE(len <= 0 || !IS_ALIGNED(len | offs, blocksize)) Then Return -EINVAL
254  When i < offs + len cycle
255  err = Encrypt or decrypt a single filesystem block of file contents
257  If err Then Return err
260  Return 0
Caller
NameDescribe
fscrypt_decrypt_bio