summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ratelimit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ratelimit.c b/lib/ratelimit.c
index 18703f92d73e..19ad3cdbd171 100644
--- a/lib/ratelimit.c
+++ b/lib/ratelimit.c
@@ -44,8 +44,10 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
* in addition to the one that will be printed by
* the entity that is holding the lock already:
*/
- if (!raw_spin_trylock_irqsave(&rs->lock, flags))
+ if (!raw_spin_trylock_irqsave(&rs->lock, flags)) {
+ ratelimit_state_inc_miss(rs);
return 0;
+ }
if (!rs->begin)
rs->begin = jiffies;