ceph: reset iov_len when discarding cap release messages
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 31 May 2013 08:26:44 +0000 (16:26 +0800)
committerSage Weil <sage@inktank.com>
Wed, 3 Jul 2013 22:32:47 +0000 (15:32 -0700)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
fs/ceph/mds_client.c

index 4d2920304be8e7e9075fd1f1b80b954cb26718f9..ddbd5907d41ba831acdd42a1acdb016147a51dce 100644 (file)
@@ -1391,6 +1391,7 @@ static void discard_cap_releases(struct ceph_mds_client *mdsc,
        num = le32_to_cpu(head->num);
        dout("discard_cap_releases mds%d %p %u\n", session->s_mds, msg, num);
        head->num = cpu_to_le32(0);
+       msg->front.iov_len = sizeof(*head);
        session->s_num_cap_releases += num;
 
        /* requeue completed messages */