Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188739
b: refs/heads/master
c: 3ca02ef
h: refs/heads/master
i:
  188737: 861d5f2
  188735: dec4c42
v: v3
  • Loading branch information
Sage Weil committed Mar 1, 2010
1 parent f60b437 commit f2cffbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70edb55bdfa8922c8ad40bc5a67abb6d9fee8d47
refs/heads/master: 3ca02ef96e119d36bc1752baeae7dd0c59c2f325
2 changes: 2 additions & 0 deletions trunk/fs/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,8 @@ void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg)
msg->hdr.src.addr = con->msgr->my_enc_addr;
msg->hdr.orig_src = msg->hdr.src;

BUG_ON(msg->front.iov_len != le32_to_cpu(msg->hdr.front_len));

/* queue */
mutex_lock(&con->mutex);
BUG_ON(!list_empty(&msg->list_head));
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/ceph/msgpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ void ceph_msgpool_put(struct ceph_msgpool *pool, struct ceph_msg *msg)
{
spin_lock(&pool->lock);
if (pool->num < pool->min) {
/* reset msg front_len; user may have changed it */
msg->front.iov_len = pool->front_len;
msg->hdr.front_len = cpu_to_le32(pool->front_len);

kref_set(&msg->kref, 1); /* retake a single ref */
list_add(&msg->list_head, &pool->msgs);
pool->num++;
Expand Down

0 comments on commit f2cffbc

Please sign in to comment.