Ver código fonte

IB/iser: Decrement CQ's active QPs accounting when QP creation fails

When creating a connection QP we choose the least used CQ and inc the
number of active QPs on that. If we fail to create the QP, we need to
decrement the active QPs counter.

Reported-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Sagi Grimberg 10 anos atrás
pai
commit
93acb7bbc7
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      drivers/infiniband/ulp/iser/iser_verbs.c

+ 4 - 0
drivers/infiniband/ulp/iser/iser_verbs.c

@@ -494,7 +494,11 @@ static int iser_create_ib_conn_res(struct ib_conn *ib_conn)
 	return ret;
 	return ret;
 
 
 out_err:
 out_err:
+	mutex_lock(&ig.connlist_mutex);
+	ib_conn->comp->active_qps--;
+	mutex_unlock(&ig.connlist_mutex);
 	iser_err("unable to alloc mem or create resource, err %d\n", ret);
 	iser_err("unable to alloc mem or create resource, err %d\n", ret);
+
 	return ret;
 	return ret;
 }
 }