From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:38351 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933561AbeCBWy4 (ORCPT ); Fri, 2 Mar 2018 17:54:56 -0500 Date: Fri, 2 Mar 2018 23:54:55 +0100 From: Christoph Hellwig Subject: Re: [PATCH v5 09/12] mm, dax: replace IS_DAX() with IS_DEVDAX() or IS_FSDAX() Message-ID: <20180302225455.GD31240@lst.de> References: <151996281307.28483.12343847096989509127.stgit@dwillia2-desk3.amr.corp.intel.com> <151996286235.28483.2635632878864807577.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <151996286235.28483.2635632878864807577.stgit@dwillia2-desk3.amr.corp.intel.com> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Dan Williams Cc: linux-nvdimm@lists.01.org, Matthew Wilcox , Ross Zwisler , stable@vger.kernel.org, Jan Kara , linux-xfs@vger.kernel.org, hch@lst.de, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org On Thu, Mar 01, 2018 at 07:54:22PM -0800, Dan Williams wrote: > 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 = file_inode(vma->vm_file); > + return IS_FSDAX(inode) || IS_DEVDAX(inode); If you look at the definition of IS_FSDAX and IS_DEVDAX this is going to evaluate into some bullshit code.