提交 e7a2bf22 编写于 作者: J Jaegeuk Kim

f2fs: fix counting inline_data inode numbers

This patch fixes wrongly counting inline_data inode numbers.
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 3289c061
...@@ -169,6 +169,7 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino) ...@@ -169,6 +169,7 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino)
goto bad_inode; goto bad_inode;
} }
unlock_new_inode(inode); unlock_new_inode(inode);
stat_inc_inline_inode(inode);
stat_inc_inline_dir(inode); stat_inc_inline_dir(inode);
trace_f2fs_iget(inode); trace_f2fs_iget(inode);
return inode; return inode;
...@@ -296,12 +297,12 @@ void f2fs_evict_inode(struct inode *inode) ...@@ -296,12 +297,12 @@ void f2fs_evict_inode(struct inode *inode)
f2fs_lock_op(sbi); f2fs_lock_op(sbi);
remove_inode_page(inode); remove_inode_page(inode);
stat_dec_inline_inode(inode);
f2fs_unlock_op(sbi); f2fs_unlock_op(sbi);
sb_end_intwrite(inode->i_sb); sb_end_intwrite(inode->i_sb);
no_delete: no_delete:
stat_dec_inline_dir(inode); stat_dec_inline_dir(inode);
stat_dec_inline_inode(inode);
invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, inode->i_ino); invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, inode->i_ino);
if (xnid) if (xnid)
invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid); invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid);
...@@ -327,7 +328,6 @@ void handle_failed_inode(struct inode *inode) ...@@ -327,7 +328,6 @@ void handle_failed_inode(struct inode *inode)
f2fs_truncate(inode); f2fs_truncate(inode);
remove_inode_page(inode); remove_inode_page(inode);
stat_dec_inline_inode(inode);
clear_inode_flag(F2FS_I(inode), FI_INLINE_DENTRY); clear_inode_flag(F2FS_I(inode), FI_INLINE_DENTRY);
alloc_nid_failed(sbi, inode->i_ino); alloc_nid_failed(sbi, inode->i_ino);
......
...@@ -198,8 +198,6 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, ...@@ -198,8 +198,6 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
inode = f2fs_iget(dir->i_sb, ino); inode = f2fs_iget(dir->i_sb, ino);
if (IS_ERR(inode)) if (IS_ERR(inode))
return ERR_CAST(inode); return ERR_CAST(inode);
stat_inc_inline_inode(inode);
} }
return d_splice_alias(inode, dentry); return d_splice_alias(inode, dentry);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册