Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp703836ybf; Wed, 26 Feb 2020 21:34:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwsXfvvh/b6L4XV1SdJpIcXvPtqXXMUpKig0gBwmiNpm25h34hyqAyXcK57vLD0RQi1WliX X-Received: by 2002:a05:6830:1555:: with SMTP id l21mr1851212otp.41.1582781656063; Wed, 26 Feb 2020 21:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582781656; cv=none; d=google.com; s=arc-20160816; b=QPjSGy4V2U3uxjcax+jNtXWmLxF3WFKPUOZRPVCGNhxGW5Om7efzIW6J4DqDAwpqjH HShM37melgRpLGg0c8rZQMbWciu3gdMcoCQ0jr1psc6iEpct0YITnzCyysj4v/iHGfeh Vw+9mwGTN2CV0vysKbo8sfvd8lVkOjKjmPXvNXti66o0LL3mIxa09T60vTIbetTuLboL 1QLLYjUTfzp8eAKvsu3dpjJwI4Garv+gQT6lwYNseTrQS2lOMdPGHOaM8+hFLZQ/SnKd ZE2I4oQ7BNk0AtiKkQiW1PCw4zj+xnzCHVMphM3BKU6UnAQMM1cbAzMIvz+mdsIexqAU lc7A== 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; bh=ba9xs5ZVCjP8GJU/J/TRTSw6a+emHwGYhEr2YhKBB9s=; b=t5DEnkgFzuDlgRb/hA/tM3B3bnaiGyAAXpdMTXL37D9EFqB/f5hXXcgJOVcbHlf/B8 rGdqxWou+LxziSnW9cUs8T5Xz6gTlS7tS91JchM36SHmVQZfUMPvg2QPxnEWVF9wTBA6 o3gL3Plr0fYvwV5mAf2W5vrerFLzVoEFpQJZbxHAIJGvxqr/9hKLR8qiTVhJtNDcZiIQ BRH6161DeOTcxT+jdhVgeaMfIF1JnRznLL/qc5ufe7sAgOzjBlP55fYKrgeFeuwBZHaO voqXPkZO/EUucU5lFRZljLuxr8QyUpYTYgatW99di+GDuiSE/1sJWyktLprxsvSJd+ha q6tw== 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; 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 s129si845074oig.177.2020.02.26.21.34.04; Wed, 26 Feb 2020 21:34:16 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728612AbgB0Fdj (ORCPT + 99 others); Thu, 27 Feb 2020 00:33:39 -0500 Received: from mga09.intel.com ([134.134.136.24]:35462 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726460AbgB0Fck (ORCPT ); Thu, 27 Feb 2020 00:32:40 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 21:32:39 -0800 X-IronPort-AV: E=Sophos;i="5.70,490,1574150400"; d="scan'208";a="241932087" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.157]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 21:32:38 -0800 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org Cc: Ira Weiny , Dave Chinner , Jan Kara , Alexander Viro , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH V5 02/12] fs: Remove unneeded IS_DAX() check Date: Wed, 26 Feb 2020 21:24:32 -0800 Message-Id: <20200227052442.22524-3-ira.weiny@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200227052442.22524-1-ira.weiny@intel.com> References: <20200227052442.22524-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 3cd4fe6b845e..63d1e533a07d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3388,7 +3388,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.21.0