aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ceph/messenger.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index f81fbce136f8..598d21830417 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1512,13 +1512,10 @@ static int write_partial_message_data(struct ceph_connection *con)
1512 &length, &last_piece); 1512 &length, &last_piece);
1513#endif 1513#endif
1514 } else { 1514 } else {
1515 size_t resid = data_len - msg_pos->data_pos; 1515 WARN(1, "con %p data_len %u but no outbound data\n",
1516 1516 con, data_len);
1517 page = zero_page; 1517 ret = -EINVAL;
1518 page_offset = msg_pos->page_pos; 1518 goto out;
1519 length = PAGE_SIZE - page_offset;
1520 length = min(resid, length);
1521 last_piece = length == resid;
1522 } 1519 }
1523 if (do_datacrc && !msg_pos->did_page_crc) { 1520 if (do_datacrc && !msg_pos->did_page_crc) {
1524 u32 crc = le32_to_cpu(msg->footer.data_crc); 1521 u32 crc = le32_to_cpu(msg->footer.data_crc);