Re: [PATCH v3 for-next 2/4] RDMA/hns: Init SRQ table for hip08

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

 



On Tue, Dec 04, 2018 at 07:38:03PM +0800, oulijun wrote:
> 在 2018/11/30 12:42, Jason Gunthorpe 写道:
> > On Fri, Nov 30, 2018 at 11:04:07AM +0800, oulijun wrote:
> >> 在 2018/11/30 8:06, Jason Gunthorpe 写道:
> >>> Is a call to xa_destroy missing?
> >>>
> >>> Jason
> >> Hi, Jason
> >>     It uses xarray instead radix tree. the orign code as follows:
> >>      spin_lock_int(&srq_table->lock);
> >>      INIT_RADIX_TREE(&srq_table->tree, GFP_ATOMIC);
> >>
> >>    So, we should use xa_init instead of it.  I think that it  should not use xa_destroy.
> > Well, radix tree didn't have a destroy, it was considered destroyed
> > when empty, while xarray does have a destroy. Seems reasonable to call
> > it even if you know the xarray is empty? Matthew?
> >
> > Jason
> >
> Hi, Matthew
>     I think that it is right for jason's views.  I check the all patches from the address from jason again. all places
> is not call the xa_destroy.  what is your opinion?

There's no need to call xa_destroy() if you know the XArray is empty.
It's just a convenience function.



[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