Re: [PATCH rdma-rc 4/5] RDMA/core: Simplify addition of restrack object

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

 



On Tue, May 25, 2021 at 10:42:53AM -0300, Jason Gunthorpe wrote:
> On Tue, May 11, 2021 at 08:48:30AM +0300, Leon Romanovsky wrote:
> 
> > @@ -3853,12 +3848,12 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr)
> >  	if (ret)
> >  		goto err2;
> >  
> > -	if (!cma_any_addr(addr))
> > -		rdma_restrack_add(&id_priv->res);
> >  	return 0;
> >  err2:
> >  	if (id_priv->cma_dev)
> >  		cma_release_dev(id_priv);
> > +	if (!cma_any_addr(addr))
> > +		rdma_restrack_del(&id_priv->res);
> 
> But this whole thing is reverting an earlier patch - the whole point
> was to avoid the restrack_del().

Not really, we are calling to rdma_restrack_add() only in "if (!cma_any_addr(addr))"
flow, so the patch does the same as the earlier one, but in more compact way.

> 
> Plus this is out of order the del has to be before the release, due to
> the other recent patch.

Shay pointed it to me too, I will fix.

Thanks

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