• Eric Biggers's avatar
    fscrypt: support decrypting multiple filesystem blocks per page · aa8bc1ac
    Eric Biggers authored
    Rename fscrypt_decrypt_page() to fscrypt_decrypt_pagecache_blocks() and
    redefine its behavior to decrypt all filesystem blocks in the given
    region of the given page, rather than assuming that the region consists
    of just one filesystem block.  Also remove the 'inode' and 'lblk_num'
    parameters, since they can be retrieved from the page as it's already
    assumed to be a pagecache page.
    
    This is in preparation for allowing encryption on ext4 filesystems with
    blocksize != PAGE_SIZE.
    
    This is based on work by Chandan Rajendra.
    Reviewed-by: default avatarChandan Rajendra <chandan@linux.ibm.com>
    Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
    aa8bc1ac
crypto.c 15.9 KB