From 7a8a4f5e75cdd89e82bac45d69d3e90468f0902b Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Mon, 28 Jul 2008 15:46:21 -0700 Subject: [PATCH] --- yaml --- r: 106925 b: refs/heads/master c: 4d9c377c81d37740b25cacf025f95c084eafabbb h: refs/heads/master i: 106923: d90ad19c953e041fcc08a9a6c6f37a45ca79de32 v: v3 --- [refs] | 2 +- trunk/lib/ratelimit.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 4cac647d0fdb..1a70429504b1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 14fcc23fdc78e9d32372553ccf21758a9bd56fa1 +refs/heads/master: 4d9c377c81d37740b25cacf025f95c084eafabbb diff --git a/trunk/lib/ratelimit.c b/trunk/lib/ratelimit.c index 35136671b215..26187edcc7ea 100644 --- a/trunk/lib/ratelimit.c +++ b/trunk/lib/ratelimit.c @@ -15,7 +15,6 @@ #include 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;