X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fcore%2Futils.c;h=72e0ebe964a08d03be218b8c17aa061818579f2f;hb=ad619800e4e034cad44299b2a22df9eebb043ac3;hp=8031eb59054e057f4556f0cf4f4d251020f57b0d;hpb=7924e4f6519dd5b349ed146fe9fe35206730be67;p=linux-2.6 diff --git a/net/core/utils.c b/net/core/utils.c index 8031eb5905..72e0ebe964 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);