IB/rdmavt, IB/qib, IB/hfi1: Use new QP put get routines
This improves readability and hides the reference count mechanism from the client drivers. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
4107b8a029
commit
4d6f85c3fa
@@ -488,8 +488,7 @@ static void rvt_remove_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp)
|
||||
spin_unlock_irqrestore(&rdi->qp_dev->qpt_lock, flags);
|
||||
if (removed) {
|
||||
synchronize_rcu();
|
||||
if (atomic_dec_and_test(&qp->refcount))
|
||||
wake_up(&qp->wait);
|
||||
rvt_put_qp(qp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -980,7 +979,7 @@ static void rvt_insert_qp(struct rvt_dev_info *rdi, struct rvt_qp *qp)
|
||||
struct rvt_ibport *rvp = rdi->ports[qp->port_num - 1];
|
||||
unsigned long flags;
|
||||
|
||||
atomic_inc(&qp->refcount);
|
||||
rvt_get_qp(qp);
|
||||
spin_lock_irqsave(&rdi->qp_dev->qpt_lock, flags);
|
||||
|
||||
if (qp->ibqp.qp_num <= 1) {
|
||||
|
Reference in New Issue
Block a user