]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: allocate correctly sized get(osd|mds)map messages
authorSage Weil <sage@newdream.net>
Mon, 14 Apr 2008 19:58:05 +0000 (12:58 -0700)
committerSage Weil <sage@newdream.net>
Mon, 14 Apr 2008 23:06:15 +0000 (16:06 -0700)
src/kernel/mon_client.c

index 649e3d4257894c40d901e667d861bc0d35de74a9..3d2066cfa7c568bb96bf14811344c7c30209767a 100644 (file)
@@ -95,7 +95,7 @@ static void work_monc_request_mdsmap(struct work_struct *work)
        dout(5, "work_monc_request_mdsmap from mon%d have %u\n", mon, 
             monc->have_mdsmap);
 
-       msg = ceph_msg_new(CEPH_MSG_MDS_GETMAP, sizeof(__u32), 0, 0, 0);
+       msg = ceph_msg_new(CEPH_MSG_MDS_GETMAP, sizeof(*h), 0, 0, 0);
        if (IS_ERR(msg))
                return;
        h = msg->front.iov_base;
@@ -124,7 +124,7 @@ void work_monc_request_osdmap(struct work_struct *work)
        
        dout(5, "ceph_monc_request_osdmap from mon%d have %u\n", mon, 
             monc->have_osdmap);
-       msg = ceph_msg_new(CEPH_MSG_OSD_GETMAP, 2*sizeof(__u32), 0, 0, 0);
+       msg = ceph_msg_new(CEPH_MSG_OSD_GETMAP, sizeof(*h), 0, 0, 0);
        if (IS_ERR(msg))
                return;
        h = msg->front.iov_base;