From: Chao Yu Date: Tue, 12 Sep 2017 06:04:05 +0000 (+0800) Subject: f2fs: detect dirty inode in evict_inode X-Git-Tag: v4.14-rc1~46^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca7d802a7d8ee4c47dce9be86ef4b27e587086bb;p=platform%2Fkernel%2Flinux-exynos.git f2fs: detect dirty inode in evict_inode Add a bugon in f2fs_evict_inode to detect inconsistent status between inode cache and related node page cache. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index c33b05a..50c88e3 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -519,6 +519,9 @@ no_delete: stat_dec_inline_dir(inode); stat_dec_inline_inode(inode); + if (!is_set_ckpt_flags(sbi, CP_ERROR_FLAG)) + f2fs_bug_on(sbi, is_inode_flag_set(inode, FI_DIRTY_INODE)); + /* ino == 0, if f2fs_new_inode() was failed t*/ if (inode->i_ino) invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino,