]> git.baikalelectronics.ru Git - kernel.git/commitdiff
f2fs: detect dirty inode in evict_inode
authorChao Yu <yuchao0@huawei.com>
Tue, 12 Sep 2017 06:04:05 +0000 (14:04 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 Sep 2017 17:02:39 +0000 (10:02 -0700)
Add a bugon in f2fs_evict_inode to detect inconsistent status between
inode cache and related node page cache.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/inode.c

index c33b05aec1a1fa24e542b4e09f57d29c0a73336e..50c88e37ed668106b20cf4993c4bff6b11f95009 100644 (file)
@@ -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,