From: Sagi Grimberg Date: Sun, 7 Dec 2014 14:09:55 +0000 (+0200) Subject: IB/iser: Decrement CQ's active QPs accounting when QP creation fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93acb7bbc7de789a97e0aed97ddb55fa607724f4;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Sagi Grimberg Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier --- 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; }