Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4645390ybb; Tue, 7 Apr 2020 11:30:49 -0700 (PDT) X-Google-Smtp-Source: APiQypLiK6+Viw2hnbF8yXhY7s3PbWghkcUhjtmbt1E+fpRBcpKheFd/lyLcI94CG0PUn/C2kPFA X-Received: by 2002:aca:3b82:: with SMTP id i124mr142663oia.61.1586284249453; Tue, 07 Apr 2020 11:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586284249; cv=none; d=google.com; s=arc-20160816; b=ahQ58olP9hrspK9kOKpa0KgTfKM69JmMFo2PrWi7T6ZDsX+7vUIDPZ/y4h0Y7Ik5O4 U3VVDNiNfEHb/QuBdu2YVvunF1IrlPgIYliEwLFuOGpqH8zqJgmvxxeWCDUD7L/82hZx Vxj3pRkvf17TVVgKU9NuUk2hAJQ2KM1bk0TuQX6OkQwoVYaynupp6Y/iKGH61SnCQlTg lUVg9TuGddgRow68DcuLQQjqNsrbWhTJmaWp/XnY4csgdEdUx2dIkPu/NFN9RScKZmR0 aZnaSd8GE+8FlNg8S8KPAHyoSEcSG/LGatOT9aRs7Pn6uHTpMJ6sq8UL1ol1UomqeyBL WAjQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=gz6R/BETLG7I/Ks0pQKZJ2lbhzodGdBSwxtACs7y3JY=; b=kFzNSZyskmhKs5BhVZPRBKDI8zqHdBcFk+xk1e47/FEZTVdbOD1R54lXfBjPXpF72s x/vykeR9/mjylbQppJZe+2rPpf+g//7F+jJaxSwjkStjxyM7aG1raTOQyVlb77X6WRKY 9P0zBsE2ZEkKW/NpsCTNS6zhp/NSUlHibZ+npjHNIFDEAU6vhOKwdiaOPuUreugFFeel IFDr9jdLIEKV0QPIj0Fqv8Ln9bs+hFggcOOQOfeogOOhZKhNo87hzJ97lg+PyK0lyYjw /o02+hUI00X32K/GMw7/7FYs21jH5YfGFT4erO737dK4b3Jy5LQ2ymWuALLTM//RmR+v WI8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x17si355080oov.65.2020.04.07.11.30.35; Tue, 07 Apr 2020 11:30:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbgDGSaY (ORCPT + 99 others); Tue, 7 Apr 2020 14:30:24 -0400 Received: from mga18.intel.com ([134.134.136.126]:23889 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726332AbgDGSaX (ORCPT ); Tue, 7 Apr 2020 14:30:23 -0400 IronPort-SDR: RsNVNDYgD3BLRiq+fkbA1bi9l//pe0uyCSW0iQWrxiBc1YK58XsZbFTmqWJKIm4062NwObJlwq E2SD1ksUS/vg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 11:30:22 -0700 IronPort-SDR: zP6tiIg6kRrA/pMoqf+R96FHz4UPz0RTkloEyk/hw9FQ7okNb9eSUAzSbNyC0awfdDI1Hn2Uuf Aw4caLFQj71A== X-IronPort-AV: E=Sophos;i="5.72,356,1580803200"; d="scan'208";a="451320858" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 11:30:21 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org Cc: Ira Weiny , Dave Chinner , Jan Kara , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jeff Moyer , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH V6 2/8] fs: Remove unneeded IS_DAX() check Date: Tue, 7 Apr 2020 11:29:52 -0700 Message-Id: <20200407182958.568475-3-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200407182958.568475-1-ira.weiny@intel.com> References: <20200407182958.568475-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Ira Weiny Remove the check because DAX now has it's own read/write methods and file systems which support DAX check IS_DAX() prior to IOCB_DIRECT on their own. Therefore, it does not matter if the file state is DAX when the iocb flags are created. Reviewed-by: Dave Chinner Reviewed-by: Jan Kara Signed-off-by: Ira Weiny --- Changes from v3: Reword commit message. Reordered to be a 'pre-cleanup' patch --- 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 abedbffe2c9e..f97b99c36cee 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3389,7 +3389,7 @@ extern int file_update_time(struct file *file); static inline bool io_is_direct(struct file *filp) { - return (filp->f_flags & O_DIRECT) || IS_DAX(filp->f_mapping->host); + return (filp->f_flags & O_DIRECT); } static inline bool vma_is_dax(struct vm_area_struct *vma) -- 2.25.1