RDMA: Handle AH allocations by IB/core
Simplify drivers by ensuring lifetime of ib_ah object. The changes in .create_ah() go hand in hand with relevant update in .destroy_ah(). We will use this opportunity and convert .destroy_ah() to don't fail, as it was suggested a long time ago, because there is nothing to do in case of failure during destroy. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
f6316032fd
commit
d345691471
@@ -3067,13 +3067,12 @@ int ocrdma_alloc_av(struct ocrdma_dev *dev, struct ocrdma_ah *ah)
|
||||
return status;
|
||||
}
|
||||
|
||||
int ocrdma_free_av(struct ocrdma_dev *dev, struct ocrdma_ah *ah)
|
||||
void ocrdma_free_av(struct ocrdma_dev *dev, struct ocrdma_ah *ah)
|
||||
{
|
||||
unsigned long flags;
|
||||
spin_lock_irqsave(&dev->av_tbl.lock, flags);
|
||||
ah->av->valid = 0;
|
||||
spin_unlock_irqrestore(&dev->av_tbl.lock, flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ocrdma_create_eqs(struct ocrdma_dev *dev)
|
||||
|
Reference in New Issue
Block a user