aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ratelimit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ratelimit.c b/lib/ratelimit.c
index 35136671b21..26187edcc7e 100644
--- a/lib/ratelimit.c
+++ b/lib/ratelimit.c
@@ -15,7 +15,6 @@
#include <linux/module.h>
static DEFINE_SPINLOCK(ratelimit_lock);
-static unsigned long flags;
/*
* __ratelimit - rate limiting
@@ -26,6 +25,8 @@ static unsigned long flags;
*/
int __ratelimit(struct ratelimit_state *rs)
{
+ unsigned long flags;
+
if (!rs->interval)
return 1;