aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-12-07 16:09:55 +0200
committerRoland Dreier <roland@purestorage.com>2014-12-15 18:11:44 -0800
commit93acb7bbc7de789a97e0aed97ddb55fa607724f4 (patch)
tree7c54cf1edd422b6359d2844bf9921994802514a3 /drivers/infiniband
parentIB/iser: Collapse cleanup and disconnect handlers (diff)
downloadlinux-dev-93acb7bbc7de789a97e0aed97ddb55fa607724f4.tar.xz
linux-dev-93acb7bbc7de789a97e0aed97ddb55fa607724f4.zip
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>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/iser/iser_verbs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 6a2a91c7cdb7..583b09e48409 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/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;
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);
+
return ret;
}