summaryrefslogtreecommitdiff
path: root/net/rds/rdma.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-01-28 03:15:48 +0300
committerAndy Grover <andy.grover@oracle.com>2010-09-09 05:11:57 +0400
commitd0ab25a83c4a08cd98b73a37d3f4c069f7b4f50b (patch)
treed21dad44f483e684c35209f61b905b53ae582050 /net/rds/rdma.c
parent4324879df06ba4db01a0b455af2d003f117e6aa3 (diff)
downloadlinux-d0ab25a83c4a08cd98b73a37d3f4c069f7b4f50b.tar.xz
RDS: purge atomic resources too in rds_message_purge()
Add atomic_free_op function, analogous to rdma_free_op, and call it in rds_message_purge(). Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/rdma.c')
-rw-r--r--net/rds/rdma.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index 91967c8bc572..0df86a382e2e 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -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.
*/