diff options
author | Theodore Ts'o <tytso@mit.edu> | 2016-11-13 22:02:22 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-11-13 22:02:22 -0500 |
commit | 6da22013bb7907b33c87968c25034b409a6161a2 (patch) | |
tree | f23cd3da57b7188241f7e2c9d2390fbc672ce3d4 /fs/ext4/inode.c | |
parent | a2f6d9c4c081ec2a02529b8af2c04f3e557a3a3e (diff) | |
parent | a6e08912861757b8b335cc49b093a51ec025c5de (diff) | |
download | linux-6da22013bb7907b33c87968c25034b409a6161a2.tar.gz linux-6da22013bb7907b33c87968c25034b409a6161a2.tar.bz2 linux-6da22013bb7907b33c87968c25034b409a6161a2.zip |
Merge branch 'fscrypt' into origin
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 3d58b2b477e8..48fbdfc43c10 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1169,7 +1169,8 @@ static int ext4_block_write_begin(struct page *page, loff_t pos, unsigned len, if (unlikely(err)) page_zero_new_buffers(page, from, to); else if (decrypt) - err = fscrypt_decrypt_page(page); + err = fscrypt_decrypt_page(page->mapping->host, page, + PAGE_SIZE, 0, page->index); return err; } #endif @@ -3746,7 +3747,9 @@ static int __ext4_block_zero_page_range(handle_t *handle, /* We expect the key to be set. */ BUG_ON(!fscrypt_has_encryption_key(inode)); BUG_ON(blocksize != PAGE_SIZE); - WARN_ON_ONCE(fscrypt_decrypt_page(page)); + BUG_ON(!PageLocked(page)); + WARN_ON_ONCE(fscrypt_decrypt_page(page->mapping->host, + page, PAGE_SIZE, 0, page->index)); } } if (ext4_should_journal_data(inode)) { |