Message ID | CAPgLHd-jM-DN1VjvwUh=-s0jLOyqijdn2xHzXhdoxRs0UTGtNg@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
> - ret = idr_alloc(&unit_table, dd, 0, 0, GFP_KERNEL); > + ret = idr_alloc(&unit_table, dd, 0, 0, GFP_ATOMIC); GFP_NOWAIT seems to match other use cases introduced by commit cf1f5bb608af6e0d57610c2740a3f69e3568eee3. Is that what should be used? Mike -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Feb 20, 2013 at 02:42:28PM +0000, Marciniszyn, Mike wrote: > > - ret = idr_alloc(&unit_table, dd, 0, 0, GFP_KERNEL); > > + ret = idr_alloc(&unit_table, dd, 0, 0, GFP_ATOMIC); > > GFP_NOWAIT seems to match other use cases introduced by commit cf1f5bb608af6e0d57610c2740a3f69e3568eee3. > > Is that what should be used? Yes, it should have been GFP_NOWAIT. Sorry about that. Thanks.
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index fcdaeea..03ed479 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c @@ -204,7 +204,7 @@ static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev) idr_preload(GFP_KERNEL); spin_lock_irqsave(&ipath_devs_lock, flags); - ret = idr_alloc(&unit_table, dd, 0, 0, GFP_KERNEL); + ret = idr_alloc(&unit_table, dd, 0, 0, GFP_ATOMIC); if (ret < 0) { printk(KERN_ERR IPATH_DRV_NAME ": Could not allocate unit ID: error %d\n", -ret);