]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/infiniband/hw/mlx5/main.c
Merge tag 'mm-stable-2023-02-20-13-37' of git://git.kernel.org/pub/scm/linux/kernel...
[thirdparty/linux.git] / drivers / infiniband / hw / mlx5 / main.c
index dc32e4518a28053b6e4e11370a03a86089f1ca14..471c3455dfebd2aaa7ab58f8e743897a883ae3b4 100644 (file)
@@ -2087,7 +2087,7 @@ static int mlx5_ib_mmap_clock_info_page(struct mlx5_ib_dev *dev,
 
        if (vma->vm_flags & (VM_WRITE | VM_EXEC))
                return -EPERM;
-       vma->vm_flags &= ~VM_MAYWRITE;
+       vm_flags_clear(vma, VM_MAYWRITE);
 
        if (!dev->mdev->clock_info)
                return -EOPNOTSUPP;
@@ -2311,7 +2311,7 @@ static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm
 
                if (vma->vm_flags & VM_WRITE)
                        return -EPERM;
-               vma->vm_flags &= ~VM_MAYWRITE;
+               vm_flags_clear(vma, VM_MAYWRITE);
 
                /* Don't expose to user-space information it shouldn't have */
                if (PAGE_SIZE > 4096)