Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32f8e839 authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Doug Ledford
Browse files

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: default avatarMax Gurtovoy <maxg@mellanox.com>
Acked-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 192539f4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -597,7 +597,9 @@ static void iser_free_ib_conn_res(struct iser_conn *iser_conn,
		  iser_conn, ib_conn->cma_id, ib_conn->qp);

	if (ib_conn->qp != NULL) {
		mutex_lock(&ig.connlist_mutex);
		ib_conn->comp->active_qps--;
		mutex_unlock(&ig.connlist_mutex);
		rdma_destroy_qp(ib_conn->cma_id);
		ib_conn->qp = NULL;
	}