From efc68ac737c64bdd7069451b156e5cd0e4900167 Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Tue, 6 Apr 2010 14:35:01 -0700 Subject: [PATCH] --- yaml --- r: 189573 b: refs/heads/master c: 2a7268abc48c8009b284bd88605d14fcb65772ec h: refs/heads/master i: 189571: 74aff87e2e74877fa820d29f5a7c5f36271dab2f v: v3 --- [refs] | 2 +- trunk/lib/ratelimit.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index cf4705f221fb..08f84d9affdc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ee5d2acd5ca1534f40e06d4f0d41a940b17beb54 +refs/heads/master: 2a7268abc48c8009b284bd88605d14fcb65772ec diff --git a/trunk/lib/ratelimit.c b/trunk/lib/ratelimit.c index 09f5ce1810dc..b4cd24ff9b29 100644 --- a/trunk/lib/ratelimit.c +++ b/trunk/lib/ratelimit.c @@ -16,9 +16,14 @@ /* * __ratelimit - rate limiting * @rs: ratelimit_state data + * @func: name of calling function * - * This enforces a rate limit: not more than @rs->ratelimit_burst callbacks - * in every @rs->ratelimit_jiffies + * This enforces a rate limit: not more than @rs->burst callbacks + * in every @rs->interval + * + * RETURNS: + * 0 means callbacks will be suppressed. + * 1 means go ahead and do it. */ int ___ratelimit(struct ratelimit_state *rs, const char *func) {