Commit 96f5b4fa authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: fix to account compressed inode correctly

stat_inc_compr_inode() needs to check FI_COMPRESSED_FILE flag, so
in f2fs_disable_compressed_file(), we should call stat_dec_compr_inode()
before clearing FI_COMPRESSED_FILE flag.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 99eabb91
......@@ -3824,8 +3824,8 @@ static inline u64 f2fs_disable_compressed_file(struct inode *inode)
return fi->i_compr_blocks;
fi->i_flags &= ~F2FS_COMPR_FL;
clear_inode_flag(inode, FI_COMPRESSED_FILE);
stat_dec_compr_inode(inode);
clear_inode_flag(inode, FI_COMPRESSED_FILE);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment