From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f199.google.com (mail-wr0-f199.google.com [209.85.128.199]) by kanga.kvack.org (Postfix) with ESMTP id D67EC6B0005 for ; Tue, 27 Feb 2018 12:06:01 -0500 (EST) Received: by mail-wr0-f199.google.com with SMTP id c37so14442941wra.5 for ; Tue, 27 Feb 2018 09:06:01 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id h9si8366659wrc.552.2018.02.27.09.06.00 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 27 Feb 2018 09:06:00 -0800 (PST) Date: Tue, 27 Feb 2018 18:05:59 +0100 From: Jan Kara Subject: Re: [PATCH v4 09/12] mm, dax: replace IS_DAX() with IS_DEVDAX() or IS_FSDAX() Message-ID: <20180227170559.o2uldn4t6wypfgic@quack2.suse.cz> References: <151970519370.26729.1011551137381425076.stgit@dwillia2-desk3.amr.corp.intel.com> <151970524289.26729.18096955322602992171.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <151970524289.26729.18096955322602992171.stgit@dwillia2-desk3.amr.corp.intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: Dan Williams Cc: linux-nvdimm@lists.01.org, Matthew Wilcox , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-mm@kvack.org, Jan Kara , linux-fsdevel@vger.kernel.org, Ross Zwisler On Mon 26-02-18 20:20:42, Dan Williams wrote: > In preparation for fixing the broken definition of S_DAX in the > CONFIG_FS_DAX=n + CONFIG_DEV_DAX=y case, convert all IS_DAX() usages to > use explicit tests for the DEVDAX and FSDAX sub-cases of DAX > functionality. > > Cc: Jan Kara > Cc: Matthew Wilcox > Cc: Ross Zwisler > Cc: > Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap") > Signed-off-by: Dan Williams Just one nit below. With that fixed you can add: Reviewed-by: Jan Kara > @@ -3208,21 +3208,19 @@ static inline bool io_is_direct(struct file *filp) > > static inline bool vma_is_dax(struct vm_area_struct *vma) > { > - return vma->vm_file && IS_DAX(vma->vm_file->f_mapping->host); > + struct inode *inode; > + > + if (!vma->vm_file) > + return false; > + inode = vma->vm_file->f_mapping->host; When changing this, use file_inode() here as well? Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org