af_vsock: rename variables in receive loop

Record is supported via MSG_EOR flag, while current logic operates
with message, so rename variables from 'record' to 'message'.

Signed-off-by: Arseny Krasnov <arseny.krasnov@kaspersky.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20210903123306.3273757-1-arseny.krasnov@kaspersky.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Arseny Krasnov 2021-09-03 15:33:03 +03:00 committed by Michael S. Tsirkin
parent 8d5ac871b5
commit 8fc92b7c15

View File

@ -2014,7 +2014,7 @@ static int __vsock_seqpacket_recvmsg(struct sock *sk, struct msghdr *msg,
{ {
const struct vsock_transport *transport; const struct vsock_transport *transport;
struct vsock_sock *vsk; struct vsock_sock *vsk;
ssize_t record_len; ssize_t msg_len;
long timeout; long timeout;
int err = 0; int err = 0;
DEFINE_WAIT(wait); DEFINE_WAIT(wait);
@ -2028,9 +2028,9 @@ static int __vsock_seqpacket_recvmsg(struct sock *sk, struct msghdr *msg,
if (err <= 0) if (err <= 0)
goto out; goto out;
record_len = transport->seqpacket_dequeue(vsk, msg, flags); msg_len = transport->seqpacket_dequeue(vsk, msg, flags);
if (record_len < 0) { if (msg_len < 0) {
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
@ -2044,14 +2044,14 @@ static int __vsock_seqpacket_recvmsg(struct sock *sk, struct msghdr *msg,
* packet. * packet.
*/ */
if (flags & MSG_TRUNC) if (flags & MSG_TRUNC)
err = record_len; err = msg_len;
else else
err = len - msg_data_left(msg); err = len - msg_data_left(msg);
/* Always set MSG_TRUNC if real length of packet is /* Always set MSG_TRUNC if real length of packet is
* bigger than user's buffer. * bigger than user's buffer.
*/ */
if (record_len > len) if (msg_len > len)
msg->msg_flags |= MSG_TRUNC; msg->msg_flags |= MSG_TRUNC;
} }