Received: by 10.223.176.5 with SMTP id f5csp1908132wra; Sun, 4 Feb 2018 15:17:11 -0800 (PST) X-Google-Smtp-Source: AH8x226O/nsquQFnYISXE5uRGtEkzi+MrDYOX2OpbXg6PdCERTAjMGAePzMoEfyjm94ocKpIEW7P X-Received: by 10.99.126.19 with SMTP id z19mr4276220pgc.182.1517786231725; Sun, 04 Feb 2018 15:17:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517786231; cv=none; d=google.com; s=arc-20160816; b=cvsMYUjrpfsFl1s3t8XP6GLuf2yeOrU2ZbjlOK3YbWeAmlSuu1WuWvi59Qe/5ILbr6 HhMEC8Ke35t17dlqrHlvCnzxRf07tJutaSMDMgkdqkz1ao1NhjKceaYd8l+r6xnYl6w7 fvivS0TqZkWhWDkpCZis7VDxv9DO5pQquU2vUhSmZlhRitNH9k4RR7FLWw09CZP9944H wAcFtofU+h4g0UMNlpJVALYzuKVcnQcGd3TY3KTEWvxS/FD/bgGUqUJCuXoyn/Fu3OMl Ajcqh/u2SMoJ6FedjBXAeHn4/qDf2eJHVNjqx8yYKf5VMBTSYE/eUZb4LrTz/8oKfFtu v/gw== 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=v6wFoRjV7T51qvcmgM2f2POD9vw80PRN/i/HDEZ9NV0=; b=T4n0Xpyu+UuwJ9mX4NdCnDFq8qf33JQAUXinz2BFSayw2q1zKxmhWUd+YBahkhey66 zX68m4OJEaXIHC8d8P+qX0kmUVx30w8TyM3rf605e6aSiQjMOvsd693ej0PYxTpogXTw F9qAqnbvLFwQEXjzqvfUN+B6YJ5Z9a7yzCvyN+Sk+pqxfemWwdXqa9S1Rwm4RhfCYeWZ 7bP29gUMiYqDgJdJAyFPRUyzvof3UBFxTY1wBPS7UOzRXX9AXWe8erXXMsVB6GRFe3UN EftC5e+pVs+mENXJJvVZbKE0t6Py0TeMMocK+nx1apteeED2WPPDboXfg6qEJMq4hwrw NSjA== 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 k13si2539230pgt.102.2018.02.04.15.16.57; Sun, 04 Feb 2018 15:17:11 -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 S1752316AbeBDXOs (ORCPT + 99 others); Sun, 4 Feb 2018 18:14:48 -0500 Received: from mga02.intel.com ([134.134.136.20]:17693 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752189AbeBDXOb (ORCPT ); Sun, 4 Feb 2018 18:14:31 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Feb 2018 15:14:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,462,1511856000"; d="scan'208";a="24654557" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga003.jf.intel.com with ESMTP; 04 Feb 2018 15:14:30 -0800 Subject: [PATCH 2/3] dax: short circuit vma_is_fsdax() in the CONFIG_FS_DAX=n case From: Dan Williams To: alex.williamson@redhat.com Cc: jack@suse.cz, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, Alexander Viro , linux-fsdevel@vger.kernel.org, hch@lst.de Date: Sun, 04 Feb 2018 15:05:25 -0800 Message-ID: <151778552571.7139.13956395885168306089.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <151778551496.7139.17808629759104553625.stgit@dwillia2-desk3.amr.corp.intel.com> References: <151778551496.7139.17808629759104553625.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 a3329258ff5c..31aeb0b86d85 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3201,6 +3201,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);