diff options
author | Joe Perches <joe@perches.com> | 2012-05-13 23:56:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-15 19:45:02 +0200 |
commit | 3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c (patch) | |
tree | 174111aa514c3d94a0c7953467b335e88b58b364 /net/sunrpc/svcsock.c | |
parent | dummy: documentation is stale (diff) | |
download | linux-3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c.tar.xz linux-3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c.zip |
net: Add net_ratelimited_function and net_<level>_ratelimited macros
__ratelimit() can be considered an inverted bool test because
it returns true when not ratelimited. Several tests in the
kernel tree use this __ratelimit() function incorrectly.
No net_ratelimit uses are incorrect currently though.
Most uses of net_ratelimit are to log something via printk or
pr_<level>.
In order to minimize the uses of net_ratelimit, and to start
standardizing the code style used for __ratelimit() and net_ratelimit(),
add a net_ratelimited_function() macro and net_<level>_ratelimited()
logging macros similar to pr_<level>_ratelimited that use the global
net_ratelimit instead of a static per call site "struct ratelimit_state".
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc/svcsock.c')
0 files changed, 0 insertions, 0 deletions