On 4/1/2019 9:54 AM, Matthew Wilcox wrote:
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.
Ah I see it now. Ok looks good. Will make sure it gets tested when it
makes it's way into the rdma-next tree.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>