From 78ffde117c5448314e99fdc58041712bcb065c9b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 5 Apr 2023 13:36:46 +0000 Subject: [PATCH] ANDROID: ashmem: fix up vm_flags direct access which is not allowed anymore Commit 1c71222e5f23 ("mm: replace vma->vm_flags direct modifications with modifier calls") removed the ability to directly access vm_flags, but provided wrapper functions to do the task instead. Use vm_flags_clear() to fix the build breakage in the ashmem code because of this change. Fixes: 1c71222e5f23 ("mm: replace vma->vm_flags direct modifications with modifier calls") Cc: Suren Baghdasaryan Change-Id: I865469c1eacd8d037eaaa85eca65e54f717e8706 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/android/ashmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index feadf798736d..11521cdb3f58 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -401,7 +401,7 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) ret = -EPERM; goto out; } - vma->vm_flags &= ~calc_vm_may_flags(~asma->prot_mask); + vm_flags_clear(vma, calc_vm_may_flags(~asma->prot_mask)); if (!asma->file) { char *name = ASHMEM_NAME_DEF;