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 коммит произвёл Michael S. Tsirkin
Родитель 8d5ac871b5
Коммит 8fc92b7c15
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

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