aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/crypto.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.com>2015-12-07 15:09:35 -0500
committerTheodore Ts'o <tytso@mit.edu>2015-12-07 15:09:35 -0500
commit53085fac02d12fcd29a9cb074ec480ff0f77ae5c (patch)
tree52b3a182a397ee36470e44b5deb4633f67c1478b /fs/ext4/crypto.c
parent2dcba4781fa3842e28f47ab23056d58cd283fca6 (diff)
ext4: provide ext4_issue_zeroout()
Create new function ext4_issue_zeroout() to zeroout contiguous (both logically and physically) part of inode data. We will need to issue zeroout when extent structure is not readily available and this function will allow us to do it without making up fake extent structures. Signed-off-by: Jan Kara <jack@suse.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/crypto.c')
-rw-r--r--fs/ext4/crypto.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
index 1a0835073663..c8021208a7eb 100644
--- a/fs/ext4/crypto.c
+++ b/fs/ext4/crypto.c
@@ -384,14 +384,12 @@ int ext4_decrypt(struct page *page)
384 EXT4_DECRYPT, page->index, page, page); 384 EXT4_DECRYPT, page->index, page, page);
385} 385}
386 386
387int ext4_encrypted_zeroout(struct inode *inode, struct ext4_extent *ex) 387int ext4_encrypted_zeroout(struct inode *inode, ext4_lblk_t lblk,
388 ext4_fsblk_t pblk, ext4_lblk_t len)
388{ 389{
389 struct ext4_crypto_ctx *ctx; 390 struct ext4_crypto_ctx *ctx;
390 struct page *ciphertext_page = NULL; 391 struct page *ciphertext_page = NULL;
391 struct bio *bio; 392 struct bio *bio;
392 ext4_lblk_t lblk = le32_to_cpu(ex->ee_block);
393 ext4_fsblk_t pblk = ext4_ext_pblock(ex);
394 unsigned int len = ext4_ext_get_actual_len(ex);
395 int ret, err = 0; 393 int ret, err = 0;
396 394
397#if 0 395#if 0