Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7581944ybl; Thu, 16 Jan 2020 02:02:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyL0oyZe5Kj6RYolNQoGBxXrZg0yjgHVGh9U+F2colPfYHvLu1QveruSqrkJMp6xgYJQdbB X-Received: by 2002:a05:6830:120b:: with SMTP id r11mr1216750otp.254.1579168962927; Thu, 16 Jan 2020 02:02:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579168962; cv=none; d=google.com; s=arc-20160816; b=IRJV1pXZW000+8FvU4uYbp2g+74E7oAYoX90iZIAEghrS1z6nbZzjFMd3KePeN++fy 5izxC5MJfm4zHDB4oFc1GCsfnBZtpnVsOBxjEa04+GAYHA6IhAxd2YQWWNEWel/JE25i MEVT7xSkqviAZ+BrdikvyXrJ9JvqXLqEi7ylpdp2aYjwpFu9u1GXtAaJIeLOYr9Yzqna 0k3NPjnZMjOD8RYHojcsP5NunYt26x7uHcx0pmKEOiTT9prjx4fmhBW6d94JSGVGUzKu 2/PtrePlNsV9vOldO3IFAuJxgxGCknVbqXmNEoLmtXjclnO+1T1X4GiR75jdFDvEp4hJ tBtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AMOXtz3eymHCe4y6ZRBBMPyO+mhtA0fjn2gOzH8wFbg=; b=GXWNcdBY/5B/0MtHT14Dd9iIx209IHjk09C0dXSxvCL/gMzN52F0+B0HYX7+EiAqE9 nRpXJRohejiyaJVlqingROWJba6it6t4GH+gLftyi80iZYx6LpfkYelGvKuq4nr+KWBd ymDvWdLHyuxizJ3f3IT58CDDHeyLzMqesehql8W0NtF0fkl9VbodOJzL7mA3KHOL4JJX o8gmWlatPaCjUQcBlpomi51qXuXckyqtis+jyXrxSJwJTclvCWMpNKw77S8MrXMaErJN byhV04wvQkqBS0MqmnYNG3JFGwi72OqQkocTr/kbqncHfnNmzW7qUOcKAjowzNjJcKlh lYjQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si12036859oib.246.2020.01.16.02.02.26; Thu, 16 Jan 2020 02:02:42 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbgAPJiJ (ORCPT + 99 others); Thu, 16 Jan 2020 04:38:09 -0500 Received: from mx2.suse.de ([195.135.220.15]:34458 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726864AbgAPJiJ (ORCPT ); Thu, 16 Jan 2020 04:38:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7D042B1AB; Thu, 16 Jan 2020 09:38:07 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 213631E0CBC; Thu, 16 Jan 2020 10:38:07 +0100 (CET) Date: Thu, 16 Jan 2020 10:38:07 +0100 From: Jan Kara To: ira.weiny@intel.com Cc: linux-kernel@vger.kernel.org, Alexander Viro , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH V2 05/12] fs: remove unneeded IS_DAX() check Message-ID: <20200116093807.GB8446@quack2.suse.cz> References: <20200110192942.25021-1-ira.weiny@intel.com> <20200110192942.25021-6-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200110192942.25021-6-ira.weiny@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri 10-01-20 11:29:35, ira.weiny@intel.com wrote: > From: Ira Weiny > > The IS_DAX() check in io_is_direct() causes a race between changing the > DAX mode 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 mode is DAX or not when the > iocb flags are created. > > Signed-off-by: Ira Weiny The patch looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > 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 d7584bcef5d3..e11989502eac 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -3365,7 +3365,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 > -- Jan Kara SUSE Labs, CR