aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorMichael Halcrow <mhalcrow@google.com>2015-04-12 00:56:10 -0400
committerTheodore Ts'o <tytso@mit.edu>2015-04-12 00:56:10 -0400
commitc9c7429c2e486f375bddd0c338cc3ad366123717 (patch)
treeb9cc5749676e272856e930f3086e4965839c44ea /fs/ext4/inode.c
parent2058f83a728adffbe00bded4f804b37a5ee58cbe (diff)
ext4 crypto: implement the ext4 decryption read path
Signed-off-by: Michael Halcrow <mhalcrow@google.com> Signed-off-by: Ildar Muslukhov <ildarm@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 7c4527e10ae4..8b4fe626919a 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3370,6 +3370,13 @@ static int __ext4_block_zero_page_range(handle_t *handle,
3370 /* Uhhuh. Read error. Complain and punt. */ 3370 /* Uhhuh. Read error. Complain and punt. */
3371 if (!buffer_uptodate(bh)) 3371 if (!buffer_uptodate(bh))
3372 goto unlock; 3372 goto unlock;
3373 if (S_ISREG(inode->i_mode) &&
3374 ext4_encrypted_inode(inode)) {
3375 /* We expect the key to be set. */
3376 BUG_ON(!ext4_has_encryption_key(inode));
3377 BUG_ON(blocksize != PAGE_CACHE_SIZE);
3378 WARN_ON_ONCE(ext4_decrypt_one(inode, page));
3379 }
3373 } 3380 }
3374 if (ext4_should_journal_data(inode)) { 3381 if (ext4_should_journal_data(inode)) {
3375 BUFFER_TRACE(bh, "get write access"); 3382 BUFFER_TRACE(bh, "get write access");