Re: [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

Sebastian Reichel
2023-01-26T17:07:39Z

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

Hi,

On Wed, Jan 25, 2023 at 12:38:48AM -0800, Suren Baghdasaryan wrote:
> Replace direct modifications to vma->vm_flags with calls to modifier
> functions to be able to track flag changes and to keep vma locking
> correctness.
>
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>
> ---
> [...]
> drivers/hsi/clients/cmt_speech.c | 2 +-
> 120 files changed, 188 insertions(+), 199 deletions(-)
> [...]
> diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
> index 8069f795c864..952a31e742a1 100644
> --- a/drivers/hsi/clients/cmt_speech.c
> +++ b/drivers/hsi/clients/cmt_speech.c
> @@ -1264,7 +1264,7 @@ static int cs_char_mmap(struct file *file, struct vm_area_struct *vma)
> if (vma_pages(vma) != 1)
> return -EINVAL;
>
> - vma->vm_flags |= VM_IO | VM_DONTDUMP | VM_DONTEXPAND;
> + set_vm_flags(vma, VM_IO | VM_DONTDUMP | VM_DONTEXPAND);
> vma->vm_ops = &cs_char_vm_ops;
> vma->vm_private_data = file->private_data;
>

Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]