summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-04-23 12:04:33 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2015-05-28 15:41:52 -0700
commit4375a33664de17af9032b5f491a49bd256670927 (patch)
tree7c083fd9fafecaac1e6b49d5c60abe1ecbe68ece /fs/f2fs/file.c
parentfcc85a4d86b5018f08717160c89c0eb50afd1dca (diff)
downloadop-kernel-dev-4375a33664de17af9032b5f491a49bd256670927.zip
op-kernel-dev-4375a33664de17af9032b5f491a49bd256670927.tar.gz
f2fs crypto: add encryption support in read/write paths
This patch adds encryption support in read and write paths. Note that, in f2fs, we need to consider cleaning operation. In cleaning procedure, we must avoid encrypting and decrypting written blocks. So, this patch implements move_encrypted_block(). Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 9eb0100..452123e 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -504,7 +504,7 @@ static int truncate_partial_data_page(struct inode *inode, u64 from,
truncate_out:
f2fs_wait_on_page_writeback(page, DATA);
zero_user(page, offset, PAGE_CACHE_SIZE - offset);
- if (!cache_only)
+ if (!cache_only || !f2fs_encrypted_inode(inode) || !S_ISREG(inode->i_mode))
set_page_dirty(page);
f2fs_put_page(page, 1);
return 0;
OpenPOWER on IntegriCloud