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 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.

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

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