From patchwork Fri Jan 17 08:46:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 23301 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F153A20540 for ; Fri, 17 Jan 2014 08:47:31 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id a41sf7352039yho.4 for ; Fri, 17 Jan 2014 00:47:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=Kc+zC3IE7bYrRbSYEnlCMjXkPlV+wiz84tp3MjT02EA=; b=HyCPvXcU3nZjjQcDn4m/9dSHMwwbBGH78JAuQuomjI3sAPfMwaERCOpkFnKXqJMWMs TAQsi5aLQ/mUDW+wPlTU31Yf606n5TQ6SdkWgRqXfcqi32yJhoKoSUGcHLWBde/GlaWZ m2pbukIvBu60w8WnGuemsEwjhRwpmhG94XCaqKEh2df4VI+3KbvNZHb5Jp1Q/ABMyxJU 0b4kpRgF1UB1nCtnNNaKjjjXj7Zjkcvtx1N1fECyarmBHMVmcpT4M7BXeU79FV+7++Tz Esp/vWaKK4ZNe4s7QgqxpQtcwxGuWvH4NX5s+11nm1lYzw7hw0SwluUg2gR3/QCuDtOp 5Oyg== X-Gm-Message-State: ALoCoQmDDGsSz9/lGgQN9WCFaRL8tkGkx5Opef5g4irOzMWukQfAY0C1q54vvMy8V1STOqFDUZEE X-Received: by 10.236.128.72 with SMTP id e48mr235836yhi.20.1389948451028; Fri, 17 Jan 2014 00:47:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.128.200 with SMTP id nq8ls1092043qeb.95.gmail; Fri, 17 Jan 2014 00:47:30 -0800 (PST) X-Received: by 10.58.146.5 with SMTP id sy5mr42271veb.43.1389948450838; Fri, 17 Jan 2014 00:47:30 -0800 (PST) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id x16si4596815vct.30.2014.01.17.00.47.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:47:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id p5so1446454vbn.30 for ; Fri, 17 Jan 2014 00:47:30 -0800 (PST) X-Received: by 10.220.183.202 with SMTP id ch10mr316586vcb.36.1389948450739; Fri, 17 Jan 2014 00:47:30 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp3909ved; Fri, 17 Jan 2014 00:47:30 -0800 (PST) X-Received: by 10.68.172.65 with SMTP id ba1mr876387pbc.18.1389948449624; Fri, 17 Jan 2014 00:47:29 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qv10si9545866pbb.82.2014.01.17.00.47.29; Fri, 17 Jan 2014 00:47:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752172AbaAQIrT (ORCPT + 26 others); Fri, 17 Jan 2014 03:47:19 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:43788 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751892AbaAQIrN (ORCPT ); Fri, 17 Jan 2014 03:47:13 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MZJ00449F2NIAE0@mailout1.samsung.com> for linux-kernel@vger.kernel.org; Fri, 17 Jan 2014 17:47:12 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-07-52d8ee0f463b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 42.38.28157.F0EE8D25; Fri, 17 Jan 2014 17:47:11 +0900 (KST) Received: from amdc1339.mshome.net ([106.116.147.30]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MZJ002DDF2F24H0@mmp1.samsung.com>; Fri, 17 Jan 2014 17:47:11 +0900 (KST) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Cc: Marek Szyprowski , Greg Kroah-Hartman , Andreas Dilger , Peng Tao Subject: [PATCH] staging: lustre: fix GFP_ATOMIC macro usage Date: Fri, 17 Jan 2014 09:46:56 +0100 Message-id: <1389948416-26390-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDJMWRmVeSWpSXmKPExsVy+t9jAV3+dzeCDHbPNLdouPaK1WLPmV/s Fs2L17NZXN41h81i7ZG77BYNH66zObB53Nt3mMXjyJHZLB6L97xk8tg/dw27R9+WVYwenzfJ BbBFcdmkpOZklqUW6dslcGU0f9jAWPCVveLh9pXMDYxL2boYOTkkBEwkdpzYwQ5hi0lcuLce KM7FISSwiFFi46o5TBBOK5PEz9u/mEGq2AQMJbredoF1iwjYSFw/8IIRpIhZYA2jxJbO22BF wkCJSZt+MYLYLAKqEhfa/7KC2LwCHhJHF34DsjmA1ilIzJlkM4GRewEjwypG0dSC5ILipPRc I73ixNzi0rx0veT83E2M4DB5Jr2DcVWDxSFGAQ5GJR5eCfEbQUKsiWXFlbmHGCU4mJVEeLfe BArxpiRWVqUW5ccXleakFh9ilOZgURLnPdhqHSgkkJ5YkpqdmlqQWgSTZeLglGpg9HJbeN8y 6vp7V6XMJTOOLHD5siY8eMqNN8FrfCUit+3beyTL6vL8fzvvRzrmP5UIZm314f3hmvZwo/aL md9vLmRZ7el95tniqB1V5uah68snXp6+bspGZ5849V+x0/5MaHrYkWt16sSHO/yWJ+e2bn6z S+4U7z/uv+bC09sKO/7yF/xTrr028ZASS3FGoqEWc1FxIgCo2TEgDwIAAA== Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an atomic allocation, the code must test __GFP_WAIT flag presence. Signed-off-by: Marek Szyprowski --- .../lustre/include/linux/libcfs/libcfs_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h index d0d942c..dddccca1 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h @@ -120,7 +120,7 @@ do { \ do { \ LASSERT(!in_interrupt() || \ ((size) <= LIBCFS_VMALLOC_SIZE && \ - ((mask) & GFP_ATOMIC)) != 0); \ + ((mask) & __GFP_WAIT) == 0)); \ } while (0) #define LIBCFS_ALLOC_POST(ptr, size) \