mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Li Chen <me@linux.beauty>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: fat: Prevent fsfuzzer from dominating the console
Date: Thu, 19 Jun 2025 21:04:33 +0900	[thread overview]
Message-ID: <87wm98aqem.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20250619113809.274808-1-me@linux.beauty>

Li Chen <me@linux.beauty> writes:

> Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
> Reviewed-by: Bin Lai <laib2@chinatelecom.cn>
> ---
>  fs/fat/misc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/fat/misc.c b/fs/fat/misc.c
> index c7a2d27120bab..75c2b59fbd532 100644
> --- a/fs/fat/misc.c
> +++ b/fs/fat/misc.c
> @@ -23,8 +23,10 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
>  	struct fat_mount_options *opts = &MSDOS_SB(sb)->options;
>  	va_list args;
>  	struct va_format vaf;
> +	static DEFINE_RATELIMIT_STATE(fat_err_rs, DEFAULT_RATELIMIT_INTERVAL,
> +								  DEFAULT_RATELIMIT_BURST);
>  
> -	if (report) {
> +	if (report && __ratelimit(&fat_err_rs)) {
>  		va_start(args, fmt);
>  		vaf.fmt = fmt;
>  		vaf.va = &args;

Why didn't use fat_fs_error_ratelimit()?

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  reply	other threads:[~2025-06-19 12:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 11:38 Li Chen
2025-06-19 12:04 ` OGAWA Hirofumi [this message]
2025-06-20  1:13   ` Li Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wm98aqem.fsf@mail.parknet.co.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@linux.beauty \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®