浏览代码

f2fs: fix incorrectly stat number of inline data inode

We should stat inline data information for temp file in f2fs_tmpfile if we
enable inline_data feature.

Otherwise, inline data stat number will be wrong after this temp file is
evicted.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Chao Yu 10 年之前
父节点
当前提交
3c0d84d6f1
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/f2fs/namei.c

+ 2 - 0
fs/f2fs/namei.c

@@ -693,6 +693,8 @@ static int f2fs_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
 	f2fs_unlock_op(sbi);
 	f2fs_unlock_op(sbi);
 
 
 	alloc_nid_done(sbi, inode->i_ino);
 	alloc_nid_done(sbi, inode->i_ino);
+
+	stat_inc_inline_inode(inode);
 	d_tmpfile(dentry, inode);
 	d_tmpfile(dentry, inode);
 	unlock_new_inode(inode);
 	unlock_new_inode(inode);
 	return 0;
 	return 0;