diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-09-12 02:04:05 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-09-12 13:02:39 -0400 |
commit | ca7d802a7d8ee4c47dce9be86ef4b27e587086bb (patch) | |
tree | dc4f81b6a204dbc62c32e95ed2c4beb81d20f1e4 | |
parent | 0abd8e70d24b665dd00972d4a259e05528cbf4c6 (diff) |
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 <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index c33b05aec1a1..50c88e37ed66 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c | |||
@@ -519,6 +519,9 @@ no_delete: | |||
519 | stat_dec_inline_dir(inode); | 519 | stat_dec_inline_dir(inode); |
520 | stat_dec_inline_inode(inode); | 520 | stat_dec_inline_inode(inode); |
521 | 521 | ||
522 | if (!is_set_ckpt_flags(sbi, CP_ERROR_FLAG)) | ||
523 | f2fs_bug_on(sbi, is_inode_flag_set(inode, FI_DIRTY_INODE)); | ||
524 | |||
522 | /* ino == 0, if f2fs_new_inode() was failed t*/ | 525 | /* ino == 0, if f2fs_new_inode() was failed t*/ |
523 | if (inode->i_ino) | 526 | if (inode->i_ino) |
524 | invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, | 527 | invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, |