diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-10-03 10:49:26 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2015-10-03 10:49:26 -0400 |
commit | 3684de8ca2b82180f2cdcf5fbcfd3d29ef0afaf8 (patch) | |
tree | 0764d2c74ee96d80b690587b90ec1d49c881de9a /fs/ext4/inode.c | |
parent | cccd147a57e47527ce9c27fcd5f0a1c5669d6870 (diff) |
ext4 crypto: ext4_page_crypto() doesn't need a encryption context
Since ext4_page_crypto() doesn't need an encryption context (at least
not any more), this allows us to simplify a number function signature
and also allows us to avoid needing to allocate a context in
ext4_block_write_begin(). It also means we no longer need a separate
ext4_decrypt_one() function.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index c95d40658979..ae52e329e986 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -965,7 +965,7 @@ static int ext4_block_write_begin(struct page *page, loff_t pos, unsigned len, | |||
965 | if (unlikely(err)) | 965 | if (unlikely(err)) |
966 | page_zero_new_buffers(page, from, to); | 966 | page_zero_new_buffers(page, from, to); |
967 | else if (decrypt) | 967 | else if (decrypt) |
968 | err = ext4_decrypt_one(inode, page); | 968 | err = ext4_decrypt(page); |
969 | return err; | 969 | return err; |
970 | } | 970 | } |
971 | #endif | 971 | #endif |
@@ -3404,7 +3404,7 @@ static int __ext4_block_zero_page_range(handle_t *handle, | |||
3404 | /* We expect the key to be set. */ | 3404 | /* We expect the key to be set. */ |
3405 | BUG_ON(!ext4_has_encryption_key(inode)); | 3405 | BUG_ON(!ext4_has_encryption_key(inode)); |
3406 | BUG_ON(blocksize != PAGE_CACHE_SIZE); | 3406 | BUG_ON(blocksize != PAGE_CACHE_SIZE); |
3407 | WARN_ON_ONCE(ext4_decrypt_one(inode, page)); | 3407 | WARN_ON_ONCE(ext4_decrypt(page)); |
3408 | } | 3408 | } |
3409 | } | 3409 | } |
3410 | if (ext4_should_journal_data(inode)) { | 3410 | if (ext4_should_journal_data(inode)) { |