Re: [PATCH rdma-next v1 01/13] RDMA/cma: Delete from restrack DB after successful destroy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 03, 2020 at 11:27:16AM -0300, Jason Gunthorpe wrote:
> On Sun, Aug 30, 2020 at 01:14:24PM +0300, Leon Romanovsky wrote:
> > diff --git a/drivers/infiniband/core/restrack.c b/drivers/infiniband/core/restrack.c
> > index 62fbb0ae9cb4..90fc74106620 100644
> > +++ b/drivers/infiniband/core/restrack.c
> > @@ -330,6 +330,9 @@ void rdma_restrack_del(struct rdma_restrack_entry *res)
> >  	rt = &dev->res[res->type];
> >
> >  	old = xa_erase(&rt->xa, res->id);
> > +	if (!old &&
> > +	    (res->type == RDMA_RESTRACK_MR || res->type == RDMA_RESTRACK_QP))
> > +		return;
> >  	WARN_ON(old != res);
> >  	res->valid = false;
>
> What is this for? It doesn't seem to have anything to do with the cm
> change.

Yes, it is a mix between two patches, will fix.

>
> Calling rdma_testrack_del() on a yet to be added ID should early exit
> from !valid right?

QP and MR are not converted yet to ib_core allocation, and they don't
have wait_for_completion() support yet, this is why we need to ball out
early.

>
> Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux