diff options
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 4153846984ac..017c0117d154 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -1041,23 +1041,21 @@ static void svc_unregister(const struct svc_serv *serv, struct net *net) | |||
1041 | * Printk the given error with the address of the client that caused it. | 1041 | * Printk the given error with the address of the client that caused it. |
1042 | */ | 1042 | */ |
1043 | static __printf(2, 3) | 1043 | static __printf(2, 3) |
1044 | int svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) | 1044 | void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) |
1045 | { | 1045 | { |
1046 | struct va_format vaf; | ||
1046 | va_list args; | 1047 | va_list args; |
1047 | int r; | ||
1048 | char buf[RPC_MAX_ADDRBUFLEN]; | 1048 | char buf[RPC_MAX_ADDRBUFLEN]; |
1049 | 1049 | ||
1050 | if (!net_ratelimit()) | 1050 | va_start(args, fmt); |
1051 | return 0; | ||
1052 | 1051 | ||
1053 | printk(KERN_WARNING "svc: %s: ", | 1052 | vaf.fmt = fmt; |
1054 | svc_print_addr(rqstp, buf, sizeof(buf))); | 1053 | vaf.va = &args; |
1055 | 1054 | ||
1056 | va_start(args, fmt); | 1055 | net_warn_ratelimited("svc: %s: %pV", |
1057 | r = vprintk(fmt, args); | 1056 | svc_print_addr(rqstp, buf, sizeof(buf)), &vaf); |
1058 | va_end(args); | ||
1059 | 1057 | ||
1060 | return r; | 1058 | va_end(args); |
1061 | } | 1059 | } |
1062 | 1060 | ||
1063 | /* | 1061 | /* |