[PATCH 04/10] fs/dax: make it possible to check dev dax support without a VMA
Christian Brauner
brauner at kernel.org
Tue Jun 17 04:43:36 PDT 2025
On Mon, Jun 16, 2025 at 09:26:54PM +0100, Matthew Wilcox wrote:
> 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?
Agreed. I've converted this to take const struct inode *.
More information about the linux-afs
mailing list