]> err.no Git - linux-2.6/blobdiff - fs/dlm/lowcomms.c
[DLM] fix iovec length in recvmsg
[linux-2.6] / fs / dlm / lowcomms.c
index 23f5ce12080b0e2f0d48b03ff844c78c5932113a..867f93d0417e3fa1ca11e0e7e4b0363aa02d4a48 100644 (file)
@@ -174,7 +174,7 @@ static int nodeid_to_addr(int nodeid, struct sockaddr *retaddr)
        return 0;
 }
 
-static struct nodeinfo *nodeid2nodeinfo(int nodeid, int alloc)
+static struct nodeinfo *nodeid2nodeinfo(int nodeid, gfp_t alloc)
 {
        struct nodeinfo *ni;
        int r;
@@ -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;
@@ -726,7 +726,7 @@ static int init_sock(void)
 }
 
 
-static struct writequeue_entry *new_writequeue_entry(int allocation)
+static struct writequeue_entry *new_writequeue_entry(gfp_t allocation)
 {
        struct writequeue_entry *entry;
 
@@ -748,7 +748,7 @@ static struct writequeue_entry *new_writequeue_entry(int allocation)
        return entry;
 }
 
-void *dlm_lowcomms_get_buffer(int nodeid, int len, int allocation, char **ppc)
+void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc)
 {
        struct writequeue_entry *e;
        int offset = 0;