diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2020-09-07 14:09:14 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-09-09 18:57:22 +0200 |
commit | 9a9ebf8cd72b809405ad571fb2f635ffc9df2420 (patch) | |
tree | 8c02fc0d7524d1ed2593d12c3ef5c5cf0aecda48 /drivers/infiniband/sw/rdmavt/ah.c | |
parent | RDMA: Restore ability to fail on PD deallocate (diff) | |
download | linux-9a9ebf8cd72b809405ad571fb2f635ffc9df2420.tar.xz linux-9a9ebf8cd72b809405ad571fb2f635ffc9df2420.zip |
RDMA: Restore ability to fail on AH destroy
Like any other IB verbs objects, AH are refcounted by ib_core. The release
of those objects are controlled by ib_core with promise that AH destroy
can't fail.
Being SW object for now, this change makes dealloc_ah() to behave like any
other destroy IB flows.
Fixes: d345691471b4 ("RDMA: Handle AH allocations by IB/core")
Link: https://lore.kernel.org/r/20200907120921.476363-3-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/ah.c')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/ah.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/ah.c b/drivers/infiniband/sw/rdmavt/ah.c index 75a04b1497c4..b938c4ffa99a 100644 --- a/drivers/infiniband/sw/rdmavt/ah.c +++ b/drivers/infiniband/sw/rdmavt/ah.c @@ -132,7 +132,7 @@ int rvt_create_ah(struct ib_ah *ibah, struct rdma_ah_init_attr *init_attr, * * Return: 0 on success */ -void rvt_destroy_ah(struct ib_ah *ibah, u32 destroy_flags) +int rvt_destroy_ah(struct ib_ah *ibah, u32 destroy_flags) { struct rvt_dev_info *dev = ib_to_rvt(ibah->device); struct rvt_ah *ah = ibah_to_rvtah(ibah); @@ -143,6 +143,7 @@ void rvt_destroy_ah(struct ib_ah *ibah, u32 destroy_flags) spin_unlock_irqrestore(&dev->n_ahs_lock, flags); rdma_destroy_ah_attr(&ah->attr); + return 0; } /** |