aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/rdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/rdma.c')
-rw-r--r--net/rds/rdma.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index dee698b979af..24274bb9e329 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -643,14 +643,14 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
643 struct rds_rdma_op *op; 643 struct rds_rdma_op *op;
644 644
645 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_rdma_args)) || 645 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_rdma_args)) ||
646 rm->m_rdma_op) 646 rm->rdma.m_rdma_op)
647 return -EINVAL; 647 return -EINVAL;
648 648
649 op = rds_rdma_prepare(rs, CMSG_DATA(cmsg)); 649 op = rds_rdma_prepare(rs, CMSG_DATA(cmsg));
650 if (IS_ERR(op)) 650 if (IS_ERR(op))
651 return PTR_ERR(op); 651 return PTR_ERR(op);
652 rds_stats_inc(s_send_rdma); 652 rds_stats_inc(s_send_rdma);
653 rm->m_rdma_op = op; 653 rm->rdma.m_rdma_op = op;
654 return 0; 654 return 0;
655} 655}
656 656
@@ -679,6 +679,7 @@ int rds_cmsg_rdma_dest(struct rds_sock *rs, struct rds_message *rm,
679 */ 679 */
680 r_key = rds_rdma_cookie_key(rm->m_rdma_cookie); 680 r_key = rds_rdma_cookie_key(rm->m_rdma_cookie);
681 681
682
682 spin_lock_irqsave(&rs->rs_rdma_lock, flags); 683 spin_lock_irqsave(&rs->rs_rdma_lock, flags);
683 mr = rds_mr_tree_walk(&rs->rs_rdma_keys, r_key, NULL); 684 mr = rds_mr_tree_walk(&rs->rs_rdma_keys, r_key, NULL);
684 if (!mr) 685 if (!mr)
@@ -689,7 +690,7 @@ int rds_cmsg_rdma_dest(struct rds_sock *rs, struct rds_message *rm,
689 690
690 if (mr) { 691 if (mr) {
691 mr->r_trans->sync_mr(mr->r_trans_private, DMA_TO_DEVICE); 692 mr->r_trans->sync_mr(mr->r_trans_private, DMA_TO_DEVICE);
692 rm->m_rdma_mr = mr; 693 rm->rdma.m_rdma_mr = mr;
693 } 694 }
694 return err; 695 return err;
695} 696}
@@ -707,5 +708,5 @@ int rds_cmsg_rdma_map(struct rds_sock *rs, struct rds_message *rm,
707 rm->m_rdma_cookie != 0) 708 rm->m_rdma_cookie != 0)
708 return -EINVAL; 709 return -EINVAL;
709 710
710 return __rds_rdma_map(rs, CMSG_DATA(cmsg), &rm->m_rdma_cookie, &rm->m_rdma_mr); 711 return __rds_rdma_map(rs, CMSG_DATA(cmsg), &rm->m_rdma_cookie, &rm->rdma.m_rdma_mr);
711} 712}