From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id EC9F86B0008 for ; Fri, 23 Feb 2018 02:27:07 -0500 (EST) Received: by mail-pf0-f198.google.com with SMTP id k78so2239500pfb.11 for ; Thu, 22 Feb 2018 23:27:07 -0800 (PST) Received: from mga06.intel.com (mga06.intel.com. [134.134.136.31]) by mx.google.com with ESMTPS id a12si1170659pgv.672.2018.02.22.23.27.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 23:27:06 -0800 (PST) Subject: [PATCH v2 4/5] dax: short circuit vma_is_fsdax() in the CONFIG_FS_DAX=n case From: Dan Williams 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> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: 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 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); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org