2024-01-23 10:58:37

by Gao Xiang

[permalink] [raw]
Subject: [PATCH] virtiofs: avoid unnecessary VM_MIXEDMAP for mmap support

After commit e1fb4a0864958 ("dax: remove VM_MIXEDMAP for fsdax and
device dax"), VM_MIXEDMAP seems unnecessary for virtiofs DAX mapping
(devmap).

At least I'm not sure why VM_MIXEDMAP is used during some internal
review (I guess that was added due to the current DAX documentation),
it could avoid copying page table when forking since page faults could
fill DAX VMAs just fine.

Signed-off-by: Gao Xiang <[email protected]>
---
fs/fuse/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 12ef91d170bb..5a3c17a80340 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -858,7 +858,7 @@ int fuse_dax_mmap(struct file *file, struct vm_area_struct *vma)
{
file_accessed(file);
vma->vm_ops = &fuse_dax_vm_ops;
- vm_flags_set(vma, VM_MIXEDMAP | VM_HUGEPAGE);
+ vm_flags_set(vma, VM_HUGEPAGE);
return 0;
}

--
2.39.3