diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-11-13 12:32:40 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-11-14 07:21:35 +0300 |
commit | 812c60564ca721a2527ed069c9221ec348368fd7 (patch) | |
tree | 080df250727189d45aa2ab0feda4a8e268af69dc /fs/f2fs | |
parent | 28cfafb73853f0494b06649716687a3ea07681d5 (diff) | |
download | linux-812c60564ca721a2527ed069c9221ec348368fd7.tar.xz |
f2fs: inject fault in inc_valid_node_count
This patch adds missing fault injection in inc_valid_node_count.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/f2fs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 44f874483ecf..ca6b0c9bc621 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1770,6 +1770,13 @@ static inline int inc_valid_node_count(struct f2fs_sb_info *sbi, 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); valid_block_count = sbi->total_valid_block_count + 1; |