projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa73e87
)
f2fs: inject fault in inc_valid_node_count
author
Chao Yu
<yuchao0@huawei.com>
Mon, 13 Nov 2017 09:32:40 +0000
(17:32 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Tue, 19 Dec 2017 03:39:14 +0000
(19:39 -0800)
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>
fs/f2fs/f2fs.h
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/f2fs.h
b/fs/f2fs/f2fs.h
index 44f874483ecf4d4ab08c1e36f0c16d4d3b2b031a..ca6b0c9bc62175296ee6f8b3e5ba4aaf74ebc9aa 100644
(file)
--- 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;