mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 22:42:04 +00:00
SUNRPC: use request size to initialize bio_vec in svc_udp_sendto()
Use the proper size when setting up the bio_vec, as otherwise only
zero-length UDP packets will be sent.
Fixes: baabf59c24
("SUNRPC: Convert svc_udp_sendto() to use the per-socket bio_vec array")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
17419aefcb
commit
1d9cabe281
@ -717,12 +717,12 @@ static int svc_udp_sendto(struct svc_rqst *rqstp)
|
||||
ARRAY_SIZE(rqstp->rq_bvec), xdr);
|
||||
|
||||
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, rqstp->rq_bvec,
|
||||
count, 0);
|
||||
count, rqstp->rq_res.len);
|
||||
err = sock_sendmsg(svsk->sk_sock, &msg);
|
||||
if (err == -ECONNREFUSED) {
|
||||
/* ICMP error on earlier request. */
|
||||
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, rqstp->rq_bvec,
|
||||
count, 0);
|
||||
count, rqstp->rq_res.len);
|
||||
err = sock_sendmsg(svsk->sk_sock, &msg);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user