dlm: free workqueues after the connections
[cascardo/linux.git] / lib / ratelimit.c
index 2c5de86..08f8043 100644 (file)
@@ -46,12 +46,14 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
                rs->begin = jiffies;
 
        if (time_is_before_jiffies(rs->begin + rs->interval)) {
-               if (rs->missed)
-                       printk(KERN_WARNING "%s: %d callbacks suppressed\n",
-                               func, rs->missed);
+               if (rs->missed) {
+                       if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) {
+                               pr_warn("%s: %d callbacks suppressed\n", func, rs->missed);
+                               rs->missed = 0;
+                       }
+               }
                rs->begin   = jiffies;
                rs->printed = 0;
-               rs->missed  = 0;
        }
        if (rs->burst && rs->burst > rs->printed) {
                rs->printed++;