Skip to content

Commit 21ac6e5

Browse files
committed
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/[email protected]/ Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Kuniyuki Iwashima <[email protected]> Cc: Mateusz Guzik <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: John Ogness <[email protected]> Cc: Sergey Senozhatsky <[email protected]>
1 parent aa2cc35 commit 21ac6e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ratelimit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
9292
atomic_set(&rs->rs_n_left, rs->burst);
9393
rs->begin = jiffies;
9494

95-
m = ratelimit_state_reset_miss(rs);
96-
if (m) {
97-
if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
95+
if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
96+
m = ratelimit_state_reset_miss(rs);
97+
if (m) {
9898
printk_deferred(KERN_WARNING
9999
"%s: %d callbacks suppressed\n", func, m);
100100
}

0 commit comments

Comments
 (0)