file.c (fcc85a4d86b5018f08717160c89c0eb50afd1dca) | file.c (4375a33664de17af9032b5f491a49bd256670927) |
---|---|
1/* 2 * fs/f2fs/file.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 490 unchanged lines hidden (view full) --- 499 } 500 501 page = get_lock_data_page(inode, index); 502 if (IS_ERR(page)) 503 return 0; 504truncate_out: 505 f2fs_wait_on_page_writeback(page, DATA); 506 zero_user(page, offset, PAGE_CACHE_SIZE - offset); | 1/* 2 * fs/f2fs/file.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 490 unchanged lines hidden (view full) --- 499 } 500 501 page = get_lock_data_page(inode, index); 502 if (IS_ERR(page)) 503 return 0; 504truncate_out: 505 f2fs_wait_on_page_writeback(page, DATA); 506 zero_user(page, offset, PAGE_CACHE_SIZE - offset); |
507 if (!cache_only) | 507 if (!cache_only || !f2fs_encrypted_inode(inode) || !S_ISREG(inode->i_mode)) |
508 set_page_dirty(page); 509 f2fs_put_page(page, 1); 510 return 0; 511} 512 513int truncate_blocks(struct inode *inode, u64 from, bool lock) 514{ 515 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); --- 1025 unchanged lines hidden --- | 508 set_page_dirty(page); 509 f2fs_put_page(page, 1); 510 return 0; 511} 512 513int truncate_blocks(struct inode *inode, u64 from, bool lock) 514{ 515 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); --- 1025 unchanged lines hidden --- |