Skip to content

Commit

Permalink
remove ratelimt()
Browse files Browse the repository at this point in the history
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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Nov 13, 2008
1 parent afef80b commit b76f90b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions include/linux/ratelimit.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,4 @@ struct ratelimit_state {
struct ratelimit_state name = {interval, burst,}

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

0 comments on commit b76f90b

Please sign in to comment.