summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorChao Yu2015-12-23 10:51:35 +0100
committerJaegeuk Kim2015-12-30 19:14:10 +0100
commitfba48a8b14f405afc5c80a93ed64a12607dd52c4 (patch)
tree0ad50ea3dfbba5b514c2828850ba544ccb9082ca /fs/f2fs/namei.c
parentf2fs: report error of do_checkpoint (diff)
downloadkernel-qcow2-linux-fba48a8b14f405afc5c80a93ed64a12607dd52c4.tar.gz
kernel-qcow2-linux-fba48a8b14f405afc5c80a93ed64a12607dd52c4.tar.xz
kernel-qcow2-linux-fba48a8b14f405afc5c80a93ed64a12607dd52c4.zip
f2fs: don't convert inline inode when inline_data option is disable
If inline_data option is disable, when truncating an inline inode with size which is not exceed maxinum inline size, we should not convert inline inode to regular one to avoid the overhead of synchronizing conversion. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 4e27c5c4b05c..e439f32d31e6 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -60,7 +60,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
if (f2fs_encrypted_inode(dir) && f2fs_may_encrypt(inode))
f2fs_set_encrypted_inode(inode);
- if (f2fs_may_inline_data(inode))
+ if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode))
set_inode_flag(F2FS_I(inode), FI_INLINE_DATA);
if (f2fs_may_inline_dentry(inode))
set_inode_flag(F2FS_I(inode), FI_INLINE_DENTRY);