Commit 812c6056 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: inject fault in inc_valid_node_count

This patch adds missing fault injection in inc_valid_node_count.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 28cfafb7
...@@ -1770,6 +1770,13 @@ static inline int inc_valid_node_count(struct f2fs_sb_info *sbi, ...@@ -1770,6 +1770,13 @@ static inline int inc_valid_node_count(struct f2fs_sb_info *sbi,
return ret; return ret;
} }
#ifdef CONFIG_F2FS_FAULT_INJECTION
if (time_to_inject(sbi, FAULT_BLOCK)) {
f2fs_show_injection_info(FAULT_BLOCK);
goto enospc;
}
#endif
spin_lock(&sbi->stat_lock); spin_lock(&sbi->stat_lock);
valid_block_count = sbi->total_valid_block_count + 1; valid_block_count = sbi->total_valid_block_count + 1;
......
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