From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DF94C35659 for ; Fri, 21 Feb 2020 17:42:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 61244206E2 for ; Fri, 21 Feb 2020 17:42:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728426AbgBURmV (ORCPT ); Fri, 21 Feb 2020 12:42:21 -0500 Received: from verein.lst.de ([213.95.11.211]:56711 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbgBURmV (ORCPT ); Fri, 21 Feb 2020 12:42:21 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id C4E3668BFE; Fri, 21 Feb 2020 18:42:17 +0100 (CET) Date: Fri, 21 Feb 2020 18:42:17 +0100 From: Christoph Hellwig To: ira.weiny@intel.com Cc: linux-kernel@vger.kernel.org, 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: Re: [PATCH V4 03/13] fs: Remove unneeded IS_DAX() check Message-ID: <20200221174217.GA11378@lst.de> References: <20200221004134.30599-1-ira.weiny@intel.com> <20200221004134.30599-4-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200221004134.30599-4-ira.weiny@intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Feb 20, 2020 at 04:41:24PM -0800, ira.weiny@intel.com wrote: > 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: 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); Please just kill io_is_direct entirely.