Re: [PATCH 21/32] hfi1: Convert hfi1_unit_table to XArray

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

 



On Mon, Apr 01, 2019 at 09:39:33AM -0400, Dennis Dalessandro wrote:
> > -	INIT_LIST_HEAD(&dd->list);
> > -	idr_preload(GFP_KERNEL);
> > -	spin_lock_irqsave(&hfi1_devs_lock, flags);
> > -
> > -	ret = idr_alloc(&hfi1_unit_table, dd, 0, 0, GFP_NOWAIT);
> > -	if (ret >= 0) {
> > -		dd->unit = ret;
> > -		list_add(&dd->list, &hfi1_dev_list);
> > -	}
> >   	dd->node = -1;
> > -	spin_unlock_irqrestore(&hfi1_devs_lock, flags);
> > -	idr_preload_end();
> > -
> > +	ret = xa_alloc_irq(&hfi1_dev_table, &dd->unit, dd, xa_limit_32b,
> > +			GFP_KERNEL);
> 
> Why change this from a no sleep to being able to sleep?

Look closer; I didn't.



[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