Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2029879ybv; Sat, 8 Feb 2020 11:36:01 -0800 (PST) X-Google-Smtp-Source: APXvYqyypkKCbyyaUhLWAbaP0DTC+0IzHOfMy996ObzrnB9As+oom+PGtnkfMr1gDb3fCqmr0tK+ X-Received: by 2002:a9d:66d1:: with SMTP id t17mr4602431otm.233.1581190561479; Sat, 08 Feb 2020 11:36:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581190561; cv=none; d=google.com; s=arc-20160816; b=YNw4e2+7RbRVmJicEx7sIKJu4cy012/7IMuS8B69tqij6OEMs2U7NaQ69WvUwBUXBe 3bNwRGC6X3TnqmzKvlTGDvaak7z2Q+eLIlShDB3yLEC/tanuPhPXZLEK2gylPqO6voDw qiykXBJ6/q+MKr6mQna5YA8xOCUMpfgt568kSCNqh0HsTPw0FXB8OFyHsEbPZ7MAJBsm +lLaiS3y3fAEWep9IC3Pffy3QqGJ6P1kEWrnTPWpoY8pRHRhmokio5gHBR1NdT8ObUIV 1q5FY1C9f6NqKIJUNros6zRj4Mlzj2rZNsjcgArTXrJF3rYpTzwhl74J2yD0jwpemsC5 7vrA== 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=au/O10k+r4dGgjiqXu38llpy2M0WL0NRLRNPf9zXFBM=; b=KugAvIsvBRF3Y/chYHSIqsWZlhSYLMb9LdPxu5SMP1Mt57S2g9CYFYwqd84EyW/v0t Oksima25Al2c68TAnMd31afIdWGqpj1Xv842EfrMJpVU8sMNN27uBsoMb+r2vk6AJJZ4 kIsBAI7GdzX+4A/1SG2V9tKHE4k7iB7zaXMTGcZ6cajErzkJE1z+yXxd/qLKd5QxCTrg 6rlKuLjHmjr4V8FUn4nq55LN06E4Yeo0ZafJhVg4pR6FNyM6+/W6x5+pew/EWRCinrLD T4inwld+zchuWwVdeWACAyx9zVq0Sp3bEoJ/gSDcpGEdTqXemSzQkYO5NvuJ6HKQ3qRP 8qkw== 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 d6si1974281ote.72.2020.02.08.11.35.50; Sat, 08 Feb 2020 11:36:01 -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 S1727790AbgBHTfT (ORCPT + 99 others); Sat, 8 Feb 2020 14:35:19 -0500 Received: from mga07.intel.com ([134.134.136.100]:41243 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727555AbgBHTev (ORCPT ); Sat, 8 Feb 2020 14:34:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2020 11:34:50 -0800 X-IronPort-AV: E=Sophos;i="5.70,418,1574150400"; d="scan'208";a="432925594" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.157]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2020 11:34:50 -0800 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org Cc: Ira Weiny , 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 v3 05/12] fs: remove unneeded IS_DAX() check Date: Sat, 8 Feb 2020 11:34:38 -0800 Message-Id: <20200208193445.27421-6-ira.weiny@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200208193445.27421-1-ira.weiny@intel.com> References: <20200208193445.27421-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 The IS_DAX() check in io_is_direct() causes a race between changing the DAX state and creating the iocb flags. Remove the check because DAX now emulates the page cache API and therefore it does not matter if the file state is DAX or not when the iocb flags are created. Reviewed-by: Jan Kara Signed-off-by: Ira Weiny --- 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