diff options
author | Eric Biggers <ebiggers@google.com> | 2019-05-20 19:29:47 +0300 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-05-28 20:27:53 +0300 |
commit | aa8bc1ac6ef32a332671ca25e06cfd277a3839a5 (patch) | |
tree | 40a7109717078adacb8bed18199f35fb706f36f3 /fs/crypto/bio.c | |
parent | 41adbcb7267b0060682576d523956160b5c617bd (diff) | |
download | linux-aa8bc1ac6ef32a332671ca25e06cfd277a3839a5.tar.xz |
fscrypt: support decrypting multiple filesystem blocks per page
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: Chandan Rajendra <chandan@linux.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'fs/crypto/bio.c')
-rw-r--r-- | fs/crypto/bio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/crypto/bio.c b/fs/crypto/bio.c index f9111ffa12ff..61da06fda45c 100644 --- a/fs/crypto/bio.c +++ b/fs/crypto/bio.c @@ -33,8 +33,7 @@ static void __fscrypt_decrypt_bio(struct bio *bio, bool done) bio_for_each_segment_all(bv, bio, iter_all) { struct page *page = bv->bv_page; - int ret = fscrypt_decrypt_page(page->mapping->host, page, - PAGE_SIZE, 0, page->index); + int ret = fscrypt_decrypt_pagecache_blocks(page, PAGE_SIZE, 0); if (ret) SetPageError(page); |