From patchwork Fri Feb 22 02:48:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2174331 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C279BDF215 for ; Fri, 22 Feb 2013 02:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755290Ab3BVCsO (ORCPT ); Thu, 21 Feb 2013 21:48:14 -0500 Received: from mail-bk0-f45.google.com ([209.85.214.45]:61834 "EHLO mail-bk0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755281Ab3BVCsO (ORCPT ); Thu, 21 Feb 2013 21:48:14 -0500 Received: by mail-bk0-f45.google.com with SMTP id i18so83776bkv.32 for ; Thu, 21 Feb 2013 18:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=1kyfpnaroj6X+HGWs36cCc7079sKf4oqnJ2Q1sZZixU=; b=OJMRRchiq7RhNeeQ9zDOn9tWbz9zSVD7jYNi1Pux+q2rPVAL2URIFHPdtQNFiTILJU b9bRDyhMiCgX0PmH5Gmto2uFzal/X0BolAiWfXABB9s/U9z65jkuAncJMMTEpbsKi9Tj Oe/BgTItMoNBFClwTambpc54e0OOOHFB5miSRd9zivRJrWeFWIqECAhv3Tp8/YIvL6Ge O8GXyt4UeD7eImz2L2NBo+UtkNon5MdEOYyMHcQQCF+pNOn7ioC12vKeD0TjgQpJJ7lo 2ENA5k8sIpxBUPwlzEhMM/1D8YpGec+XHgujCG6E/Sl1Km5Ub77BBTl4POJ7wmPLKqBu Ridg== MIME-Version: 1.0 X-Received: by 10.205.133.1 with SMTP id hw1mr120267bkc.58.1361501292883; Thu, 21 Feb 2013 18:48:12 -0800 (PST) Received: by 10.204.30.210 with HTTP; Thu, 21 Feb 2013 18:48:12 -0800 (PST) In-Reply-To: References: Date: Fri, 22 Feb 2013 10:48:12 +0800 Message-ID: Subject: [PATCH -next v3] IB/ipath: use GFP_NOWAIT under spin lock From: Wei Yongjun To: tj@kernel.org Cc: infinipath@intel.com, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, linux-rdma@vger.kernel.org, akpm@linux-foundation.org Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Wei Yongjun A spin lock is taken here so we should use GFP_NOWAIT like other case. Signed-off-by: Wei Yongjun Acked-by: Mike Marciniszyn Acked-by: Tejun Heo --- v2 -> v3: add acked and cc akpm@linux-foundation.org --- 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 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);