[DLM] fix iovec length in recvmsg
authorPatrick Caulfield <pcaulfie@redhat.com>
Thu, 12 Oct 2006 09:41:22 +0000 (10:41 +0100)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 12 Oct 2006 21:11:33 +0000 (17:11 -0400)
The DLM always passes the iovec length as 1, this is wrong when the circular
buffer wraps round.

Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/dlm/lowcomms.c

index 7bcea7c..867f93d 100644 (file)
@@ -548,7 +548,7 @@ static int receive_from_sock(void)
        }
        len = iov[0].iov_len + iov[1].iov_len;
 
-       r = ret = kernel_recvmsg(sctp_con.sock, &msg, iov, 1, len,
+       r = ret = kernel_recvmsg(sctp_con.sock, &msg, iov, msg.msg_iovlen, len,
                                 MSG_NOSIGNAL | MSG_DONTWAIT);
        if (ret <= 0)
                goto out_close;