Received: by 10.223.185.116 with SMTP id b49csp365763wrg; Thu, 22 Feb 2018 23:29:34 -0800 (PST) X-Google-Smtp-Source: AH8x225FDixdkL/FDPJcWPkKJQC34A2TQDULZchijzYArKohwRY1m/PkDeK9qGTUtBalKIg/ZGBd X-Received: by 10.99.145.194 with SMTP id l185mr688663pge.394.1519370974727; Thu, 22 Feb 2018 23:29:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519370974; cv=none; d=google.com; s=arc-20160816; b=GOhlihxY4O5tshdTMzJ0oFctXlLBpu/BCWt+8YmsUSR1CAuHIm6JBNMzFKOU3bLs9j 1Um5rwFrTf3Ec+Wm9jCrKCHC5dtrxx7gjOMwCUiWwSLoOneUPvh0AAaczhheoiv5Tcl8 xL9sXGiOnGBlGkefwm3Sun6/4DzImWbgkvV9juQ1ti8MXLNz05eHFGFhkYkFf1y/XdH3 VzZoqqVx+yFY2ilmwBBkr6Ssc+1c9rcWvcwiIyQhun46mvC7zgTG3bWaoUxCZXsQ2uTL WQQebDkuO72VkHW8VvBSd9afIeztdY9D4wnHh7GBozWFUgCLF8HGjtWV49OKZPMRorpv eNpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:arc-authentication-results; bh=p74spGPsJdtO7lp/asHyp0UJ9QkdYixp8GQy8LwqZjI=; b=L/ex3WAeSzmDGT+NhoK4SfGfZOGJJCYtTkQCy7TD9grN/lIN39dTtqrDsKmU0o1MCa J6tt6NmYMXx4+EDgIgHhq7n6zVlYOna369uzYruRHqJbs9/w8B8zE+p8q5AyTJw+7bwB 5a2PctkB9vTIF9MEx1xg2s0kZPtKFxVjsIAXl9WxXAA0XUBW8a1kDZ+ZeE7EcN1UMARR X77rV7RUGXJ2iwS6aXG1KCZizsfNqgWRflZW7CsVbamP1xaC1xgiRtONr5y/zBZa4qmF MXQ8ddKqLBa/hDotqPxfpp30mroQBswGn+6TCYe7ZjZuIH619UQnJxhn0w5mI/e5CkmT WgxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5-v6si1343988plr.668.2018.02.22.23.29.20; Thu, 22 Feb 2018 23:29:34 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbeBWH1G (ORCPT + 99 others); Fri, 23 Feb 2018 02:27:06 -0500 Received: from mga14.intel.com ([192.55.52.115]:41453 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751608AbeBWH1C (ORCPT ); Fri, 23 Feb 2018 02:27:02 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2018 23:27:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,382,1515484800"; d="scan'208";a="36845437" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga002.jf.intel.com with ESMTP; 22 Feb 2018 23:27:01 -0800 Subject: [PATCH v2 3/5] dax: fix S_DAX definition From: Dan Williams To: linux-nvdimm@lists.01.org Cc: Jan Kara , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-mm@kvack.org, Alexander Viro , linux-fsdevel@vger.kernel.org, Christoph Hellwig Date: Thu, 22 Feb 2018 23:17:56 -0800 Message-ID: <151937027614.18973.7636331271085629639.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <151937026001.18973.12034171121582300402.stgit@dwillia2-desk3.amr.corp.intel.com> References: <151937026001.18973.12034171121582300402.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-9-g687f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make sure S_DAX is defined in the CONFIG_FS_DAX=n + CONFIG_DEV_DAX=y case. Otherwise vma_is_dax() may incorrectly return false in the Device-DAX case. Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Christoph Hellwig Cc: Jan Kara Cc: Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap") Signed-off-by: Dan Williams --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 79c413985305..b2fa9b4c1e51 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1859,7 +1859,7 @@ struct super_operations { #define S_IMA 1024 /* Inode has an associated IMA struct */ #define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */ #define S_NOSEC 4096 /* no suid or xattr security attributes */ -#ifdef CONFIG_FS_DAX +#if IS_ENABLED(CONFIG_FS_DAX) || IS_ENABLED(CONFIG_DEV_DAX) #define S_DAX 8192 /* Direct Access, avoiding the page cache */ #else #define S_DAX 0 /* Make all the DAX code disappear */