diff options
author | Max Gurtovoy <maxg@mellanox.com> | 2017-02-01 18:55:18 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-19 09:18:31 -0500 |
commit | 32f8e839edebe3310dd077439ce0e9a96e0c2352 (patch) | |
tree | 7556ce243fc4d0c6091547a6476aaf0d5f3fb864 | |
parent | 192539f4ce36e5b80b9eb1f4ccd759a92eed2ff9 (diff) |
IB/iser: Protect completion context active_qps update
As iser connections can share completion contexts, we need
to protect the active_qps update each time we set it.
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_verbs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 6a9d1cb548ee..30b622f2ab73 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c | |||
@@ -597,7 +597,9 @@ static void iser_free_ib_conn_res(struct iser_conn *iser_conn, | |||
597 | iser_conn, ib_conn->cma_id, ib_conn->qp); | 597 | iser_conn, ib_conn->cma_id, ib_conn->qp); |
598 | 598 | ||
599 | if (ib_conn->qp != NULL) { | 599 | if (ib_conn->qp != NULL) { |
600 | mutex_lock(&ig.connlist_mutex); | ||
600 | ib_conn->comp->active_qps--; | 601 | ib_conn->comp->active_qps--; |
602 | mutex_unlock(&ig.connlist_mutex); | ||
601 | rdma_destroy_qp(ib_conn->cma_id); | 603 | rdma_destroy_qp(ib_conn->cma_id); |
602 | ib_conn->qp = NULL; | 604 | ib_conn->qp = NULL; |
603 | } | 605 | } |