|
@@ -16,9 +16,14 @@
|
|
/*
|
|
/*
|
|
* __ratelimit - rate limiting
|
|
* __ratelimit - rate limiting
|
|
* @rs: ratelimit_state data
|
|
* @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)
|
|
int ___ratelimit(struct ratelimit_state *rs, const char *func)
|
|
{
|
|
{
|