RDMA/core: Clean up a variable name in ib_create_srq_user()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 22 Sep 2022 11:22:35 +0000 (14:22 +0300)
committerLeon Romanovsky <leon@kernel.org>
Thu, 22 Sep 2022 11:31:05 +0000 (14:31 +0300)
"&srq->pd->usecnt" and "&pd->usecnt" are different names for the same
reference count.  Use "&pd->usecnt" consistently for both the increment
and decrement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YyxFe3Pm0uzRuBkQ@kili
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/verbs.c

index f8964c8cf0ade9b7bf70ca0511cff0be2ede3ce9..26b021f43ba40fbe930c95cdbd3fab30e5765eb8 100644 (file)
@@ -1038,7 +1038,7 @@ struct ib_srq *ib_create_srq_user(struct ib_pd *pd,
        ret = pd->device->ops.create_srq(srq, srq_init_attr, udata);
        if (ret) {
                rdma_restrack_put(&srq->res);
-               atomic_dec(&srq->pd->usecnt);
+               atomic_dec(&pd->usecnt);
                if (srq->srq_type == IB_SRQT_XRC && srq->ext.xrc.xrcd)
                        atomic_dec(&srq->ext.xrc.xrcd->usecnt);
                if (ib_srq_has_cq(srq->srq_type))