mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
ratelimit: Don't flush misses counter if RATELIMIT_MSG_ON_RELEASE
Restore the previous semantics where the misses counter is unchanged if the RATELIMIT_MSG_ON_RELEASE flag is set. Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/ Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/ Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Petr Mladek <pmladek@suse.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Kuniyuki Iwashima <kuniyu@amazon.com> Cc: Mateusz Guzik <mjguzik@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: John Ogness <john.ogness@linutronix.de> Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
This commit is contained in:
@@ -92,9 +92,9 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
|
||||
atomic_set(&rs->rs_n_left, rs->burst);
|
||||
rs->begin = jiffies;
|
||||
|
||||
m = ratelimit_state_reset_miss(rs);
|
||||
if (m) {
|
||||
if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
|
||||
if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
|
||||
m = ratelimit_state_reset_miss(rs);
|
||||
if (m) {
|
||||
printk_deferred(KERN_WARNING
|
||||
"%s: %d callbacks suppressed\n", func, m);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user