diff options
author | Sebastian Sanchez <sebastian.sanchez@intel.com> | 2016-12-08 04:33:46 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-11 21:29:42 +0100 |
commit | b44980f8794faf3561d970fe8c05e34765fbdc9b (patch) | |
tree | 77c47a320482f91ad4ba56fd5237d1a4ed4afb53 /drivers/infiniband/hw/hfi1 | |
parent | IB/hfi1: Preserve external device completed bit (diff) | |
download | linux-b44980f8794faf3561d970fe8c05e34765fbdc9b.tar.xz linux-b44980f8794faf3561d970fe8c05e34765fbdc9b.zip |
IB/hfi1: Replace qp->refcount release code with standard driver wrapper
Some parts of the code don't use the standard release
wrapper rvt_put_qp() for decrementing and testing
the refcount to then try to use a resource.
Replace this code with the standard driver wrapper.
Fixes: Commit 4d6f85c3fa55 ("IB/rdmavt, IB/qib, IB/hfi1: Use new QP put get routines")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1')
-rw-r--r-- | drivers/infiniband/hw/hfi1/driver.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c index 6563e4d38b80..d4261163bd25 100644 --- a/drivers/infiniband/hw/hfi1/driver.c +++ b/drivers/infiniband/hw/hfi1/driver.c @@ -793,8 +793,7 @@ static inline void process_rcv_qp_work(struct hfi1_packet *packet) hfi1_schedule_send(qp); spin_unlock_irqrestore(&qp->s_lock, flags); } - if (atomic_dec_and_test(&qp->refcount)) - wake_up(&qp->wait); + rvt_put_qp(qp); } } |