aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/message.c')
-rw-r--r--net/rds/message.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/net/rds/message.c b/net/rds/message.c
index 809656c2b25c..4421d160b1a4 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -63,17 +63,17 @@ static void rds_message_purge(struct rds_message *rm)
63 if (unlikely(test_bit(RDS_MSG_PAGEVEC, &rm->m_flags))) 63 if (unlikely(test_bit(RDS_MSG_PAGEVEC, &rm->m_flags)))
64 return; 64 return;
65 65
66 for (i = 0; i < rm->m_nents; i++) { 66 for (i = 0; i < rm->data.m_nents; i++) {
67 rdsdebug("putting data page %p\n", (void *)sg_page(&rm->m_sg[i])); 67 rdsdebug("putting data page %p\n", (void *)sg_page(&rm->data.m_sg[i]));
68 /* XXX will have to put_page for page refs */ 68 /* XXX will have to put_page for page refs */
69 __free_page(sg_page(&rm->m_sg[i])); 69 __free_page(sg_page(&rm->data.m_sg[i]));
70 } 70 }
71 rm->m_nents = 0; 71 rm->data.m_nents = 0;
72 72
73 if (rm->m_rdma_op) 73 if (rm->rdma.m_rdma_op)
74 rds_rdma_free_op(rm->m_rdma_op); 74 rds_rdma_free_op(rm->rdma.m_rdma_op);
75 if (rm->m_rdma_mr) 75 if (rm->rdma.m_rdma_mr)
76 rds_mr_put(rm->m_rdma_mr); 76 rds_mr_put(rm->rdma.m_rdma_mr);
77} 77}
78 78
79void rds_message_inc_purge(struct rds_incoming *inc) 79void rds_message_inc_purge(struct rds_incoming *inc)
@@ -224,7 +224,7 @@ struct rds_message *rds_message_alloc(unsigned int nents, gfp_t gfp)
224 goto out; 224 goto out;
225 225
226 if (nents) 226 if (nents)
227 sg_init_table(rm->m_sg, nents); 227 sg_init_table(rm->data.m_sg, nents);
228 atomic_set(&rm->m_refcount, 1); 228 atomic_set(&rm->m_refcount, 1);
229 INIT_LIST_HEAD(&rm->m_sock_item); 229 INIT_LIST_HEAD(&rm->m_sock_item);
230 INIT_LIST_HEAD(&rm->m_conn_item); 230 INIT_LIST_HEAD(&rm->m_conn_item);
@@ -245,10 +245,10 @@ struct rds_message *rds_message_map_pages(unsigned long *page_addrs, unsigned in
245 245
246 set_bit(RDS_MSG_PAGEVEC, &rm->m_flags); 246 set_bit(RDS_MSG_PAGEVEC, &rm->m_flags);
247 rm->m_inc.i_hdr.h_len = cpu_to_be32(total_len); 247 rm->m_inc.i_hdr.h_len = cpu_to_be32(total_len);
248 rm->m_nents = ceil(total_len, PAGE_SIZE); 248 rm->data.m_nents = ceil(total_len, PAGE_SIZE);
249 249
250 for (i = 0; i < rm->m_nents; ++i) { 250 for (i = 0; i < rm->data.m_nents; ++i) {
251 sg_set_page(&rm->m_sg[i], 251 sg_set_page(&rm->data.m_sg[i],
252 virt_to_page(page_addrs[i]), 252 virt_to_page(page_addrs[i]),
253 PAGE_SIZE, 0); 253 PAGE_SIZE, 0);
254 } 254 }
@@ -278,7 +278,7 @@ struct rds_message *rds_message_copy_from_user(struct iovec *first_iov,
278 /* 278 /*
279 * now allocate and copy in the data payload. 279 * now allocate and copy in the data payload.
280 */ 280 */
281 sg = rm->m_sg; 281 sg = rm->data.m_sg;
282 iov = first_iov; 282 iov = first_iov;
283 iov_off = 0; 283 iov_off = 0;
284 sg_off = 0; /* Dear gcc, sg->page will be null from kzalloc. */ 284 sg_off = 0; /* Dear gcc, sg->page will be null from kzalloc. */
@@ -289,7 +289,7 @@ struct rds_message *rds_message_copy_from_user(struct iovec *first_iov,
289 GFP_HIGHUSER); 289 GFP_HIGHUSER);
290 if (ret) 290 if (ret)
291 goto out; 291 goto out;
292 rm->m_nents++; 292 rm->data.m_nents++;
293 sg_off = 0; 293 sg_off = 0;
294 } 294 }
295 295
@@ -348,7 +348,7 @@ int rds_message_inc_copy_to_user(struct rds_incoming *inc,
348 348
349 iov = first_iov; 349 iov = first_iov;
350 iov_off = 0; 350 iov_off = 0;
351 sg = rm->m_sg; 351 sg = rm->data.m_sg;
352 vec_off = 0; 352 vec_off = 0;
353 copied = 0; 353 copied = 0;
354 354