aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_qp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_qp.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_qp.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/qib/qib_qp.c b/drivers/infiniband/hw/qib/qib_qp.c
index 7fcc150d603c..6ddc0264aad2 100644
--- a/drivers/infiniband/hw/qib/qib_qp.c
+++ b/drivers/infiniband/hw/qib/qib_qp.c
@@ -1325,7 +1325,6 @@ int qib_qp_iter_next(struct qib_qp_iter *iter)
1325 struct qib_qp *pqp = iter->qp; 1325 struct qib_qp *pqp = iter->qp;
1326 struct qib_qp *qp; 1326 struct qib_qp *qp;
1327 1327
1328 rcu_read_lock();
1329 for (; n < dev->qp_table_size; n++) { 1328 for (; n < dev->qp_table_size; n++) {
1330 if (pqp) 1329 if (pqp)
1331 qp = rcu_dereference(pqp->next); 1330 qp = rcu_dereference(pqp->next);
@@ -1333,18 +1332,11 @@ int qib_qp_iter_next(struct qib_qp_iter *iter)
1333 qp = rcu_dereference(dev->qp_table[n]); 1332 qp = rcu_dereference(dev->qp_table[n]);
1334 pqp = qp; 1333 pqp = qp;
1335 if (qp) { 1334 if (qp) {
1336 if (iter->qp)
1337 atomic_dec(&iter->qp->refcount);
1338 atomic_inc(&qp->refcount);
1339 rcu_read_unlock();
1340 iter->qp = qp; 1335 iter->qp = qp;
1341 iter->n = n; 1336 iter->n = n;
1342 return 0; 1337 return 0;
1343 } 1338 }
1344 } 1339 }
1345 rcu_read_unlock();
1346 if (iter->qp)
1347 atomic_dec(&iter->qp->refcount);
1348 return ret; 1340 return ret;
1349} 1341}
1350 1342