--- a/kernel/nv-mmap.c 2019-12-11 22:04:24.000000000 +0000 +++ b/kernel/nv-mmap.c 2023-04-24 11:43:59.912426877 +0000 @@ -312,7 +312,7 @@ goto done; } - vma->vm_flags |= VM_IO; + vm_flags_set(vma, VM_IO); } else { @@ -363,8 +363,8 @@ NV_PRINT_AT(NV_DBG_MEMINFO, at); - vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED); - vma->vm_flags |= (VM_DONTEXPAND | VM_DONTDUMP); + vm_flags_set(vma, VM_IO | VM_LOCKED | VM_RESERVED); + vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP); } if (status == 0) @@ -374,8 +374,8 @@ if ((prot & NV_PROTECT_WRITEABLE) == 0) { vma->vm_page_prot = NV_PGPROT_READ_ONLY(vma->vm_page_prot); - vma->vm_flags &= ~VM_WRITE; - vma->vm_flags &= ~VM_MAYWRITE; + vm_flags_clear(vma, VM_WRITE); + vm_flags_clear(vma, VM_MAYWRITE); } vma->vm_ops = &nv_vm_ops;