提交 b76f90b5 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

remove ratelimt()

It mistakenly assumes that a static local in an inlined function is a
kernel-wide singleton.  It also has no callers, so let's remove it.

Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 afef80b3
...@@ -17,11 +17,4 @@ struct ratelimit_state { ...@@ -17,11 +17,4 @@ struct ratelimit_state {
struct ratelimit_state name = {interval, burst,} struct ratelimit_state name = {interval, burst,}
extern int __ratelimit(struct ratelimit_state *rs); extern int __ratelimit(struct ratelimit_state *rs);
static inline int ratelimit(void)
{
static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
DEFAULT_RATELIMIT_BURST);
return __ratelimit(&rs);
}
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册