Re: [PATCH RESEND 08/12] mm: update all remaining mmap_prepare users to use vma_flags_t
Zi Yan <[email protected]>
| Newsgroups | gmane.comp.freedesktop.xorg.drivers.intel,gmane.linux.kernel,gmane.comp.video.dri.devel,gmane.linux.file-systems,gmane.linux.kernel.aio.general,gmane.comp.file-systems.ext4,gmane.linux.kernel.mm,gmane.linux.kernel.lsm |
|---|---|
| Message-ID | <[email protected]> |
On 19 Jan 2026, at 16:19, Lorenzo Stoakes wrote: > We will be shortly removing the vm_flags_t field from vm_area_desc so we > need to update all mmap_prepare users to only use the dessc->vma_flags > field. > > This patch achieves that and makes all ancillary changes required to make > this possible. > > This lays the groundwork for future work to eliminate the use of vm_flags_t > in vm_area_desc altogether and more broadly throughout the kernel. > > While we're here, we take the opportunity to replace VM_REMAP_FLAGS with > VMA_REMAP_FLAGS, the vma_flags_t equivalent. > > No functional changes intended. > > Signed-off-by: Lorenzo Stoakes <[email protected]> > --- > drivers/char/mem.c | 6 +++--- > drivers/dax/device.c | 10 +++++----- > fs/aio.c | 2 +- > fs/erofs/data.c | 5 +++-- > fs/ext4/file.c | 4 ++-- > fs/ntfs3/file.c | 2 +- > fs/orangefs/file.c | 4 ++-- > fs/ramfs/file-nommu.c | 2 +- > fs/resctrl/pseudo_lock.c | 2 +- > fs/romfs/mmap-nommu.c | 2 +- > fs/xfs/xfs_file.c | 4 ++-- > fs/zonefs/file.c | 3 ++- > include/linux/dax.h | 4 ++-- > include/linux/mm.h | 24 +++++++++++++++++++----- > kernel/relay.c | 2 +- > mm/memory.c | 17 ++++++++--------- > 16 files changed, 54 insertions(+), 39 deletions(-) > You missed one instance in !CONFIG_DAX: diff --git a/include/linux/dax.h b/include/linux/dax.h index 162c19fe478c..48d20b790a7d 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -111,11 +111,11 @@ static inline void set_dax_nomc(struct dax_device *dax_dev) static inline void set_dax_synchronous(struct dax_device *dax_dev) { } -static inline bool daxdev_mapping_supported(vm_flags_t vm_flags, +static inline bool daxdev_mapping_supported(vma_flags_t flags, const struct inode *inode, struct dax_device *dax_dev) { - return !(vm_flags & VM_SYNC); + return !vma_flags_test(flags, VMA_SYNC_BIT); } static inline size_t dax_recovery_write(struct dax_device *dax_dev, pgoff_t pgoff, void *addr, size_t bytes, struct iov_iter *i) Best Regards, Yan, Zi