• Eric Biggers's avatar
    fscrypt: introduce fscrypt_encrypt_block_inplace() · 03569f2f
    Eric Biggers authored
    fscrypt_encrypt_page() behaves very differently depending on whether the
    filesystem set FS_CFLG_OWN_PAGES in its fscrypt_operations.  This makes
    the function difficult to understand and document.  It also makes it so
    that all callers have to provide inode and lblk_num, when fscrypt could
    determine these itself for pagecache pages.
    
    Therefore, move the FS_CFLG_OWN_PAGES behavior into a new function
    fscrypt_encrypt_block_inplace().
    
    This is in preparation for allowing encryption on ext4 filesystems with
    blocksize != PAGE_SIZE.
    Reviewed-by: default avatarChandan Rajendra <chandan@linux.ibm.com>
    Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
    03569f2f
crypto.c 2.32 KB