diff options
author | Joe Perches <joe@perches.com> | 2012-05-13 17:56:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-15 13:45:03 -0400 |
commit | e87cc4728f0e2fb663e592a1141742b1d6c63256 (patch) | |
tree | b8219696d37f0c8d0521d5853560b97fc96dc667 /net/sunrpc/svc_xprt.c | |
parent | 3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c (diff) |
net: Convert net_ratelimit uses to net_<level>_ratelimited
Standardize the net core ratelimited logging functions.
Coalesce formats, align arguments.
Change a printk then vprintk sequence to use printf extension %pV.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 4bda09d7e1a4..b98ee3514912 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -544,14 +544,11 @@ static void svc_check_conn_limits(struct svc_serv *serv) | |||
544 | struct svc_xprt *xprt = NULL; | 544 | struct svc_xprt *xprt = NULL; |
545 | spin_lock_bh(&serv->sv_lock); | 545 | spin_lock_bh(&serv->sv_lock); |
546 | if (!list_empty(&serv->sv_tempsocks)) { | 546 | if (!list_empty(&serv->sv_tempsocks)) { |
547 | if (net_ratelimit()) { | 547 | /* Try to help the admin */ |
548 | /* Try to help the admin */ | 548 | net_notice_ratelimited("%s: too many open connections, consider increasing the %s\n", |
549 | printk(KERN_NOTICE "%s: too many open " | 549 | serv->sv_name, serv->sv_maxconn ? |
550 | "connections, consider increasing %s\n", | 550 | "max number of connections" : |
551 | serv->sv_name, serv->sv_maxconn ? | 551 | "number of threads"); |
552 | "the max number of connections." : | ||
553 | "the number of threads."); | ||
554 | } | ||
555 | /* | 552 | /* |
556 | * Always select the oldest connection. It's not fair, | 553 | * Always select the oldest connection. It's not fair, |
557 | * but so is life | 554 | * but so is life |