summaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw/rdmavt/mcast.c
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2016-12-14 22:44:08 +0300
committerDoug Ledford <dledford@redhat.com>2016-12-14 22:44:08 +0300
commit253f8b22e0ad643edafd75e831e5c765732877f5 (patch)
treec0e682e339f287a70606927863b9cc622c9952f1 /drivers/infiniband/sw/rdmavt/mcast.c
parent884fa4f3048c4c43facfa6ba3b710169f7ee162c (diff)
parent22dccc5454a39427de7b87a080d026b6bf66a7b9 (diff)
downloadlinux-253f8b22e0ad643edafd75e831e5c765732877f5.tar.xz
Merge branch 'hfi1' into merge-test
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/mcast.c')
-rw-r--r--drivers/infiniband/sw/rdmavt/mcast.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/rdmavt/mcast.c b/drivers/infiniband/sw/rdmavt/mcast.c
index 983d319ac976..05c8c2afb0e3 100644
--- a/drivers/infiniband/sw/rdmavt/mcast.c
+++ b/drivers/infiniband/sw/rdmavt/mcast.c
@@ -81,7 +81,7 @@ static struct rvt_mcast_qp *rvt_mcast_qp_alloc(struct rvt_qp *qp)
goto bail;
mqp->qp = qp;
- atomic_inc(&qp->refcount);
+ rvt_get_qp(qp);
bail:
return mqp;
@@ -92,8 +92,7 @@ static void rvt_mcast_qp_free(struct rvt_mcast_qp *mqp)
struct rvt_qp *qp = mqp->qp;
/* Notify hfi1_destroy_qp() if it is waiting. */
- if (atomic_dec_and_test(&qp->refcount))
- wake_up(&qp->wait);
+ rvt_put_qp(qp);
kfree(mqp);
}