summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2016-07-28 03:07:36 +0200
committerDoug Ledford <dledford@redhat.com>2016-08-03 04:46:21 +0200
commitfe508272c963d62de4183c32b6883c3d54c557ef (patch)
treec2385e5031ec34ab82ba9e37134e61681dfccb51 /drivers/infiniband/sw
parentIB/hfi1: Handle kzalloc failure in init_pervl_scs (diff)
downloadlinux-fe508272c963d62de4183c32b6883c3d54c557ef.tar.xz
linux-fe508272c963d62de4183c32b6883c3d54c557ef.zip
IB/rdmavt: Eliminate redundant opcode test in mr ref clear
The use of the specific opcode test is redundant since all ack entry users correctly manipulate the mr pointer to selectively trigger the reference clearing. The overly specific test hinders the use of implementation specific operations. The change needs to get rid of the union to insure that an atomic value is not seen as an MR pointer. Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/rdmavt/qp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
index 8ccf1b970b2c..bdb540f25a88 100644
--- a/drivers/infiniband/sw/rdmavt/qp.c
+++ b/drivers/infiniband/sw/rdmavt/qp.c
@@ -435,8 +435,7 @@ static void rvt_clear_mr_refs(struct rvt_qp *qp, int clr_sends)
for (n = 0; n < rvt_max_atomic(rdi); n++) {
struct rvt_ack_entry *e = &qp->s_ack_queue[n];
- if (e->opcode == IB_OPCODE_RC_RDMA_READ_REQUEST &&
- e->rdma_sge.mr) {
+ if (e->rdma_sge.mr) {
rvt_put_mr(e->rdma_sge.mr);
e->rdma_sge.mr = NULL;
}