diff options
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 4ad5fbbb18b4..94eed9b80038 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -1055,10 +1055,8 @@ err_bad: | |||
1055 | */ | 1055 | */ |
1056 | u32 svc_max_payload(const struct svc_rqst *rqstp) | 1056 | u32 svc_max_payload(const struct svc_rqst *rqstp) |
1057 | { | 1057 | { |
1058 | int max = RPCSVC_MAXPAYLOAD_TCP; | 1058 | u32 max = rqstp->rq_xprt->xpt_class->xcl_max_payload; |
1059 | 1059 | ||
1060 | if (rqstp->rq_sock->sk_sock->type == SOCK_DGRAM) | ||
1061 | max = RPCSVC_MAXPAYLOAD_UDP; | ||
1062 | if (rqstp->rq_server->sv_max_payload < max) | 1060 | if (rqstp->rq_server->sv_max_payload < max) |
1063 | max = rqstp->rq_server->sv_max_payload; | 1061 | max = rqstp->rq_server->sv_max_payload; |
1064 | return max; | 1062 | return max; |