diff options
Diffstat (limited to 'net/sunrpc/svc.c')
| -rw-r--r-- | net/sunrpc/svc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 7fccf9675df8..cc9852897395 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
| @@ -1363,7 +1363,19 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, | |||
| 1363 | memcpy(&rqstp->rq_addr, &req->rq_xprt->addr, rqstp->rq_addrlen); | 1363 | memcpy(&rqstp->rq_addr, &req->rq_xprt->addr, rqstp->rq_addrlen); |
| 1364 | memcpy(&rqstp->rq_arg, &req->rq_rcv_buf, sizeof(rqstp->rq_arg)); | 1364 | memcpy(&rqstp->rq_arg, &req->rq_rcv_buf, sizeof(rqstp->rq_arg)); |
| 1365 | memcpy(&rqstp->rq_res, &req->rq_snd_buf, sizeof(rqstp->rq_res)); | 1365 | memcpy(&rqstp->rq_res, &req->rq_snd_buf, sizeof(rqstp->rq_res)); |
| 1366 | |||
| 1367 | /* Adjust the argument buffer length */ | ||
| 1366 | rqstp->rq_arg.len = req->rq_private_buf.len; | 1368 | rqstp->rq_arg.len = req->rq_private_buf.len; |
| 1369 | if (rqstp->rq_arg.len <= rqstp->rq_arg.head[0].iov_len) { | ||
| 1370 | rqstp->rq_arg.head[0].iov_len = rqstp->rq_arg.len; | ||
| 1371 | rqstp->rq_arg.page_len = 0; | ||
| 1372 | } else if (rqstp->rq_arg.len <= rqstp->rq_arg.head[0].iov_len + | ||
| 1373 | rqstp->rq_arg.page_len) | ||
| 1374 | rqstp->rq_arg.page_len = rqstp->rq_arg.len - | ||
| 1375 | rqstp->rq_arg.head[0].iov_len; | ||
| 1376 | else | ||
| 1377 | rqstp->rq_arg.len = rqstp->rq_arg.head[0].iov_len + | ||
| 1378 | rqstp->rq_arg.page_len; | ||
| 1367 | 1379 | ||
| 1368 | /* reset result send buffer "put" position */ | 1380 | /* reset result send buffer "put" position */ |
| 1369 | resv->iov_len = 0; | 1381 | resv->iov_len = 0; |
