Do not bother looking up the file type in the case when Filesystem-DAX
is disabled at build time.

Cc: Alexander Viro <v...@zeniv.linux.org.uk>
Cc: linux-fsde...@vger.kernel.org
Cc: Christoph Hellwig <h...@lst.de>
Cc: Jan Kara <j...@suse.cz>
Signed-off-by: Dan Williams <dan.j.willi...@intel.com>
---
 include/linux/fs.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index a3329258ff5c..31aeb0b86d85 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3201,6 +3201,8 @@ static inline bool vma_is_fsdax(struct vm_area_struct 
*vma)
 
        if (!vma->vm_file)
                return false;
+       if (!IS_ENABLED(CONFIG_FS_DAX))
+               return false;
        if (!vma_is_dax(vma))
                return false;
        inode = file_inode(vma->vm_file);

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to