From patchwork Tue Apr 7 18:29:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 11478587 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9101392C for ; Tue, 7 Apr 2020 18:31:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6FE5B2078C for ; Tue, 7 Apr 2020 18:31:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbgDGSaY (ORCPT ); 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 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@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)