X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=net%2Fcore%2Futils.c;h=72e0ebe964a08d03be218b8c17aa061818579f2f;hb=61e0e79ee3c609eb34edf2fe023708cba6a79b1f;hp=8031eb59054e057f4556f0cf4f4d251020f57b0d;hpb=6208e77e7fa9e69f399fddc55b1cf9527fbde599;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/net/core/utils.c b/net/core/utils.c index 8031eb59054e..72e0ebe964a0 100644 --- a/net/core/utils.c +++ b/net/core/utils.c @@ -31,17 +31,16 @@ #include #include -int net_msg_cost __read_mostly = 5*HZ; -int net_msg_burst __read_mostly = 10; int net_msg_warn __read_mostly = 1; EXPORT_SYMBOL(net_msg_warn); +DEFINE_RATELIMIT_STATE(net_ratelimit_state, 5 * HZ, 10); /* * All net warning printk()s should be guarded by this function. */ int net_ratelimit(void) { - return __printk_ratelimit(net_msg_cost, net_msg_burst); + return __ratelimit(&net_ratelimit_state); } EXPORT_SYMBOL(net_ratelimit);