diff options
author | Chao Yu <chao@kernel.org> | 2024-01-26 23:19:16 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-02-05 18:58:40 -0800 |
commit | b1c9d3f833ba60a288db111d7fe38edfeb9b8fbb (patch) | |
tree | 10f911e0e072abaec2b6ef877c958cc3dbdf4c8f /fs/f2fs/dir.c | |
parent | c2034ef6192a65a986a45c2aa2ed05824fdc0e9f (diff) |
f2fs: support printk_ratelimited() in f2fs_printk()
This patch supports using printk_ratelimited() in f2fs_printk(), and
wrap ratelimited f2fs_printk() into f2fs_{err,warn,info}_ratelimited(),
then, use these new helps to clean up codes.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r-- | fs/f2fs/dir.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 042593aed1ec..3f20d94e12f9 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -995,9 +995,8 @@ int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, de = &d->dentry[bit_pos]; if (de->name_len == 0) { if (found_valid_dirent || !bit_pos) { - printk_ratelimited( - "%sF2FS-fs (%s): invalid namelen(0), ino:%u, run fsck to fix.", - KERN_WARNING, sbi->sb->s_id, + f2fs_warn_ratelimited(sbi, + "invalid namelen(0), ino:%u, run fsck to fix.", le32_to_cpu(de->ino)); set_sbi_flag(sbi, SBI_NEED_FSCK); } |