Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7edffd25 authored by Al Viro's avatar Al Viro
Browse files

ipvs: switch to sock_recvmsg()



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 956a27ec
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1636,17 +1636,14 @@ static int
ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen)
{
	struct msghdr		msg = {NULL,};
	struct kvec		iov;
	struct kvec		iov = {buffer, buflen};
	int			len;

	EnterFunction(7);

	/* Receive a packet */
	iov.iov_base     = buffer;
	iov.iov_len      = (size_t)buflen;

	len = kernel_recvmsg(sock, &msg, &iov, 1, buflen, MSG_DONTWAIT);

	iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &iov, 1, buflen);
	len = sock_recvmsg(sock, &msg, MSG_DONTWAIT);
	if (len < 0)
		return len;