summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2024-01-26 23:19:17 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2024-02-05 18:58:40 -0800
commit0b8eb814e05885cde53c1d56ee012a029b8413e6 (patch)
tree594ef54fa380eac70a2445de638cdd9893450142 /fs/f2fs
parentb1c9d3f833ba60a288db111d7fe38edfeb9b8fbb (diff)
downloadlinux-0b8eb814e05885cde53c1d56ee012a029b8413e6.tar.gz
linux-0b8eb814e05885cde53c1d56ee012a029b8413e6.tar.bz2
linux-0b8eb814e05885cde53c1d56ee012a029b8413e6.zip
f2fs: use f2fs_err_ratelimited() to avoid redundant logs
Use f2fs_err_ratelimited() to instead f2fs_err() in f2fs_record_stop_reason() and f2fs_record_errors() to avoid redundant logs. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/super.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 3e2a5e3b3e99..1b718bebfaa1 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4096,7 +4096,9 @@ static void f2fs_record_stop_reason(struct f2fs_sb_info *sbi)
f2fs_up_write(&sbi->sb_lock);
if (err)
- f2fs_err(sbi, "f2fs_commit_super fails to record err:%d", err);
+ f2fs_err_ratelimited(sbi,
+ "f2fs_commit_super fails to record stop_reason, err:%d",
+ err);
}
void f2fs_save_errors(struct f2fs_sb_info *sbi, unsigned char flag)
@@ -4139,8 +4141,9 @@ static void f2fs_record_errors(struct f2fs_sb_info *sbi, unsigned char error)
err = f2fs_commit_super(sbi, false);
if (err)
- f2fs_err(sbi, "f2fs_commit_super fails to record errors:%u, err:%d",
- error, err);
+ f2fs_err_ratelimited(sbi,
+ "f2fs_commit_super fails to record errors:%u, err:%d",
+ error, err);
out_unlock:
f2fs_up_write(&sbi->sb_lock);
}