Re: [PATCH 04/10] fs/dax: make it possible to check dev dax support without a VMA
Matthew Wilcox <[email protected]>
| Newsgroups | gmane.linux.kernel.aio.general,gmane.linux.block,gmane.linux.kernel,gmane.comp.freedesktop.xorg.drivers.intel,gmane.comp.video.dri.devel,gmane.linux.file-systems,gmane.linux.file-systems.union,gmane.linux.kernel.mm,gmane.comp.file-systems.btrfs,gmane.comp.file-systems.ceph.devel,gmane.comp.file-systems.coda.general,gmane.comp.file-systems.ecryptfs.general,gmane.comp.file-systems.ext4,gmane.linux.file-systems.f2fs,gmane.linux.uml.devel,gmane.linux.drivers.mtd,gmane.linux.nfs,gmane.comp.file-systems.nilfs.user,gmane.linux.hardware.karma.devel,gmane.linux.kernel.cifs,gmane.network.samba.internals |
|---|---|
| Message-ID | <[email protected]> |
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?
--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to [email protected]. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>