crypto.c (f41683a204ea61568f0fd0804d47c19561f2ee39) | crypto.c (53085fac02d12fcd29a9cb074ec480ff0f77ae5c) |
---|---|
1/* 2 * linux/fs/ext4/crypto.c 3 * 4 * Copyright (C) 2015, Google, Inc. 5 * 6 * This contains encryption functions for ext4 7 * 8 * Written by Michael Halcrow, 2014. --- 370 unchanged lines hidden (view full) --- 379int ext4_decrypt(struct page *page) 380{ 381 BUG_ON(!PageLocked(page)); 382 383 return ext4_page_crypto(page->mapping->host, 384 EXT4_DECRYPT, page->index, page, page); 385} 386 | 1/* 2 * linux/fs/ext4/crypto.c 3 * 4 * Copyright (C) 2015, Google, Inc. 5 * 6 * This contains encryption functions for ext4 7 * 8 * Written by Michael Halcrow, 2014. --- 370 unchanged lines hidden (view full) --- 379int ext4_decrypt(struct page *page) 380{ 381 BUG_ON(!PageLocked(page)); 382 383 return ext4_page_crypto(page->mapping->host, 384 EXT4_DECRYPT, page->index, page, page); 385} 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 struct ext4_crypto_ctx *ctx; 390 struct page *ciphertext_page = NULL; 391 struct bio *bio; | 389{ 390 struct ext4_crypto_ctx *ctx; 391 struct page *ciphertext_page = NULL; 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; 396 397#if 0 398 ext4_msg(inode->i_sb, KERN_CRIT, 399 "ext4_encrypted_zeroout ino %lu lblk %u len %u", 400 (unsigned long) inode->i_ino, lblk, len); 401#endif 402 --- 69 unchanged lines hidden --- | 393 int ret, err = 0; 394 395#if 0 396 ext4_msg(inode->i_sb, KERN_CRIT, 397 "ext4_encrypted_zeroout ino %lu lblk %u len %u", 398 (unsigned long) inode->i_ino, lblk, len); 399#endif 400 --- 69 unchanged lines hidden --- |