RDMA: Restore ability to fail on SRQ destroy
In similar way to other IB objects, restore the ability to return error on
SRQ destroy. Strictly speaking, this change is not necessary, and provided
here to ensure a symmetrical interface like other destroy functions.
Fixes: 68e326dea1
("RDMA: Handle SRQ allocations by IB/core")
Link: https://lore.kernel.org/r/20200907120921.476363-5-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
fd89099d63
commit
119181d1d4
@@ -2411,7 +2411,7 @@ struct ib_device_ops {
|
||||
enum ib_srq_attr_mask srq_attr_mask,
|
||||
struct ib_udata *udata);
|
||||
int (*query_srq)(struct ib_srq *srq, struct ib_srq_attr *srq_attr);
|
||||
void (*destroy_srq)(struct ib_srq *srq, struct ib_udata *udata);
|
||||
int (*destroy_srq)(struct ib_srq *srq, struct ib_udata *udata);
|
||||
struct ib_qp *(*create_qp)(struct ib_pd *pd,
|
||||
struct ib_qp_init_attr *qp_init_attr,
|
||||
struct ib_udata *udata);
|
||||
@@ -3654,9 +3654,11 @@ int ib_destroy_srq_user(struct ib_srq *srq, struct ib_udata *udata);
|
||||
*
|
||||
* NOTE: for user srq use ib_destroy_srq_user with valid udata!
|
||||
*/
|
||||
static inline int ib_destroy_srq(struct ib_srq *srq)
|
||||
static inline void ib_destroy_srq(struct ib_srq *srq)
|
||||
{
|
||||
return ib_destroy_srq_user(srq, NULL);
|
||||
int ret = ib_destroy_srq_user(srq, NULL);
|
||||
|
||||
WARN_ONCE(ret, "Destroy of kernel SRQ shouldn't fail");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user