aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorGravatar Yangtao Li <frank.li@vivo.com> 2022-12-21 02:39:04 +0800
committerGravatar Jaegeuk Kim <jaegeuk@kernel.org> 2023-01-11 11:15:19 -0800
commitc40e15a9a59f79e79d9500f1fd019321ec35b959 (patch)
tree89dc3711f16003ff6e0724ed84cec867d0424d5d /fs/f2fs/super.c
parentf2fs: add a f2fs_ prefix to punch_hole() and expand_inode_data() (diff)
downloadlinux-c40e15a9a59f79e79d9500f1fd019321ec35b959.tar.gz
linux-c40e15a9a59f79e79d9500f1fd019321ec35b959.tar.bz2
linux-c40e15a9a59f79e79d9500f1fd019321ec35b959.zip
f2fs: merge f2fs_show_injection_info() into time_to_inject()
There is no need to additionally use f2fs_show_injection_info() to output information. Concatenate time_to_inject() and __time_to_inject() via a macro. In the new __time_to_inject() function, pass in the caller function name and parent function. In this way, we no longer need the f2fs_show_injection_info() function, and let's remove it. Suggested-by: Chao Yu <chao@kernel.org> Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 1d057a4c6642..5fc83771042d 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1371,10 +1371,8 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)
{
struct f2fs_inode_info *fi;
- if (time_to_inject(F2FS_SB(sb), FAULT_SLAB_ALLOC)) {
- f2fs_show_injection_info(F2FS_SB(sb), FAULT_SLAB_ALLOC);
+ if (time_to_inject(F2FS_SB(sb), FAULT_SLAB_ALLOC))
return NULL;
- }
fi = alloc_inode_sb(sb, f2fs_inode_cachep, GFP_F2FS_ZERO);
if (!fi)
@@ -2594,10 +2592,8 @@ retry:
int f2fs_dquot_initialize(struct inode *inode)
{
- if (time_to_inject(F2FS_I_SB(inode), FAULT_DQUOT_INIT)) {
- f2fs_show_injection_info(F2FS_I_SB(inode), FAULT_DQUOT_INIT);
+ if (time_to_inject(F2FS_I_SB(inode), FAULT_DQUOT_INIT))
return -ESRCH;
- }
return dquot_initialize(inode);
}