[PATCH 04/10] fs/dax: make it possible to check dev dax support without a VMA

Matthew Wilcox willy at infradead.org
Mon Jun 16 13:26:54 PDT 2025


On Mon, Jun 16, 2025 at 08:33:23PM +0100, Lorenzo Stoakes wrote:
>  fs/ext4/file.c      |  2 +-
>  fs/xfs/xfs_file.c   |  3 ++-

Both of these already have the inode from the file ...

> +static inline bool daxdev_mapping_supported(vm_flags_t vm_flags,
> +					    struct file *file,
> +					    struct dax_device *dax_dev)
>  {
> -	if (!(vma->vm_flags & VM_SYNC))
> +	if (!(vm_flags & VM_SYNC))
>  		return true;
> -	if (!IS_DAX(file_inode(vma->vm_file)))
> +	if (!IS_DAX(file_inode(file)))
>  		return false;
>  	return dax_synchronous(dax_dev);

... and the only thing this function uses from the file is the inode.
So maybe pass in the inode rather than the file?




More information about the linux-afs mailing list