aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/messenger.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c
index 986d8fb9c574..d5eef76a253c 100644
--- a/fs/ceph/messenger.c
+++ b/fs/ceph/messenger.c
@@ -453,12 +453,16 @@ static void prepare_write_message(struct ceph_connection *con)
453 con->out_kvec_bytes = 1 + sizeof(con->out_temp_ack); 453 con->out_kvec_bytes = 1 + sizeof(con->out_temp_ack);
454 } 454 }
455 455
456 /* move message to sending/sent list */
457 m = list_first_entry(&con->out_queue, 456 m = list_first_entry(&con->out_queue,
458 struct ceph_msg, list_head); 457 struct ceph_msg, list_head);
459 con->out_msg = m; 458 con->out_msg = m;
460 ceph_msg_get(m); 459 if (test_bit(LOSSYTX, &con->state)) {
461 list_move_tail(&m->list_head, &con->out_sent); 460 /* put message on sent list */
461 ceph_msg_get(m);
462 list_move_tail(&m->list_head, &con->out_sent);
463 } else {
464 list_del_init(&m->list_head);
465 }
462 466
463 m->hdr.seq = cpu_to_le64(++con->out_seq); 467 m->hdr.seq = cpu_to_le64(++con->out_seq);
464 468