Received: by 10.223.185.116 with SMTP id b49csp364644wrg; Thu, 22 Feb 2018 23:28:23 -0800 (PST) X-Google-Smtp-Source: AH8x226VM8nCQXnyttNu5KrrVkeUJxi7SMiCPZWsZp3Asacark4VFUNglOr05hHzb467IDi/rMRW X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr827546plt.434.1519370903002; Thu, 22 Feb 2018 23:28:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519370902; cv=none; d=google.com; s=arc-20160816; b=BCxnnaGbYlYvs3ydRPc+fokFX3MfCFB+Im8/4+5ax5rm+8ZZiK6AXuFhffbgUBw1iq SrQ2l3pYWCjEe8okvDYAVTA14QscWP6nje5us4L+Jvpw+hQJbZ5NTzLPQDXtpgPRkktu d2kgKP+IDFh3oErgul0LRa2uzVcFMekohiRcghFmOIpETy/G1/G5nZzfKDjHaUWD6HCO 8QlCEBKWmtcNSHDfLmiRkJtZNkaGzSpfgwEfB8sqE452oZn/vlwJa2G6RDwXd2T0wdY4 1/bnUKEte3yOfhZp6B9jo+iwbJSg0iIV3NcFRkwekxDLrEqE/pdpDzGhoNjBj9hYQOhA uFwA== 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=2PnJRTUJ1Nc33OPtT0Pkm9mCjM8MZFojNX/4Mx2xspo=; b=iDSVVIe4KOxUjpA/cQ2cGobJ2RrqMvMBkSepgjOGA8UWaoFogVjnxDwCs7l+VZmyZM PAmXBZhe2HbxHNSK3T23oGme2011gxqn0+9DR9nwaz+X3Hnw3cJQasdAoBQHpiy+0eUG Elnlhw/Wk9hATYZ72TwweYgJmDEf04bvhL62FZ1qYPwNQnvFs9xDFfS+E3ERfEh5tJI0 ATRl0MeqPI4s8b8L4f6sjhx+hMxFi78GcwtKjZusRlKtqBOAvrQgWUObnYp+nvupA+lA CNiLKva473q9GFZ7t9cPX7KeeLsb3qJWOfYuA8HQJwuWPQ7LKK4LPxnBvMEwcbgLr5Wi /72Q== 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 79si1371913pfn.282.2018.02.22.23.28.09; Thu, 22 Feb 2018 23:28:22 -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 S1751746AbeBWH1I (ORCPT + 99 others); Fri, 23 Feb 2018 02:27:08 -0500 Received: from mga17.intel.com ([192.55.52.151]:21962 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751608AbeBWH1H (ORCPT ); Fri, 23 Feb 2018 02:27:07 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2018 23:27:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,382,1515484800"; d="scan'208";a="33526933" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga001.jf.intel.com with ESMTP; 22 Feb 2018 23:27:06 -0800 Subject: [PATCH v2 4/5] dax: short circuit vma_is_fsdax() in the CONFIG_FS_DAX=n case From: Dan Williams To: linux-nvdimm@lists.01.org Cc: Jan Kara , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Viro , linux-fsdevel@vger.kernel.org, Christoph Hellwig Date: Thu, 22 Feb 2018 23:18:01 -0800 Message-ID: <151937028128.18973.18029610933124841542.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 Do not bother looking up the file type in the case when Filesystem-DAX is disabled at build time. Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Christoph Hellwig Cc: Jan Kara Signed-off-by: Dan Williams --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index b2fa9b4c1e51..8f80d9fff86d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3195,6 +3195,8 @@ static inline bool vma_is_fsdax(struct vm_area_struct *vma) if (!vma->vm_file) return false; + if (!IS_ENABLED(CONFIG_FS_DAX)) + return false; if (!vma_is_dax(vma)) return false; inode = file_inode(vma->vm_file);