Skip to content
Commit 0b578f35 authored by Chandan Rajendra's avatar Chandan Rajendra Committed by Eric Biggers
Browse files

ext4: decrypt only the needed blocks in ext4_block_write_begin()



In ext4_block_write_begin(), only decrypt the blocks that actually need
to be decrypted (up to two blocks which intersect the boundaries of the
region that will be written to), rather than assuming blocksize ==
PAGE_SIZE and decrypting the whole page.

This is in preparation for allowing encryption on ext4 filesystems with
blocksize != PAGE_SIZE.

Signed-off-by: default avatarChandan Rajendra <chandan@linux.ibm.com>
(EB: rebase onto previous changes, improve the commit message,
 and move the check for encrypted inode)
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
parent 7e0785fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment