Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214396
b: refs/heads/master
c: d0ab25a
h: refs/heads/master
v: v3
  • Loading branch information
Andy Grover committed Sep 9, 2010
1 parent 79463a7 commit 1c4d102
Show file tree
Hide file tree
Showing 4 changed files with 23 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: 4324879df06ba4db01a0b455af2d003f117e6aa3
refs/heads/master: d0ab25a83c4a08cd98b73a37d3f4c069f7b4f50b
5 changes: 5 additions & 0 deletions trunk/net/rds/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ static void rds_message_purge(struct rds_message *rm)
rds_rdma_free_op(&rm->rdma.m_rdma_op);
if (rm->rdma.m_rdma_mr)
rds_mr_put(rm->rdma.m_rdma_mr);

if (rm->atomic.op_active)
rds_atomic_free_op(&rm->atomic);
if (rm->atomic.op_rdma_mr)
rds_mr_put(rm->atomic.op_rdma_mr);
}

void rds_message_put(struct rds_message *rm)
Expand Down
16 changes: 16 additions & 0 deletions trunk/net/rds/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,22 @@ void rds_rdma_free_op(struct rds_rdma_op *ro)
ro->r_active = 0;
}

void rds_atomic_free_op(struct rm_atomic_op *ao)
{
struct page *page = sg_page(ao->op_sg);

/* Mark page dirty if it was possibly modified, which
* is the case for a RDMA_READ which copies from remote
* to local memory */
set_page_dirty(page);
put_page(page);

kfree(ao->op_notifier);
ao->op_notifier = NULL;
ao->op_active = 0;
}


/*
* Count the number of pages needed to describe an incoming iovec.
*/
Expand Down
1 change: 1 addition & 0 deletions trunk/net/rds/rds.h
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
int rds_cmsg_rdma_map(struct rds_sock *rs, struct rds_message *rm,
struct cmsghdr *cmsg);
void rds_rdma_free_op(struct rds_rdma_op *ro);
void rds_atomic_free_op(struct rm_atomic_op *ao);
void rds_rdma_send_complete(struct rds_message *rm, int wc_status);
void rds_atomic_send_complete(struct rds_message *rm, int wc_status);
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
Expand Down

0 comments on commit 1c4d102

Please sign in to comment.