diff mbox

[-next,v2] IB/ipath: use GFP_NOWAIT under spin lock

Message ID CAPgLHd965-++Kj6HE-wjHqpZjortmmCAvApSSwiXaX6YwWncHQ@mail.gmail.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Wei Yongjun Feb. 21, 2013, 5:45 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

A spin lock is taken here so we should use GFP_NOWAIT like
other case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/infiniband/hw/ipath/ipath_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



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

Comments

Marciniszyn, Mike Feb. 21, 2013, 2:34 p.m. UTC | #1
> Subject: [PATCH -next v2] IB/ipath: use GFP_NOWAIT under spin lock
> 
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
--
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
Tejun Heo Feb. 21, 2013, 3:33 p.m. UTC | #2
On Wed, Feb 20, 2013 at 9:45 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> A spin lock is taken here so we should use GFP_NOWAIT like
> other case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks!
Tejun Heo Feb. 21, 2013, 3:34 p.m. UTC | #3
On Thu, Feb 21, 2013 at 7:33 AM, Tejun Heo <tj@kernel.org> wrote:
>> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Acked-by: Tejun Heo <tj@kernel.org>

Just noticed akpm isn't cc'd.  Can you please repost w/
akpm@linux-foundation.org cc'd? All related patches are going through
-mm.

Thanks.
diff mbox

Patch

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_NOWAIT);
 	if (ret < 0) {
 		printk(KERN_ERR IPATH_DRV_NAME
 		       ": Could not allocate unit ID: error %d\n", -ret);