diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2023-04-05 13:36:46 +0000 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2023-08-31 16:36:22 +0530 |
commit | 23f45252fe0892d8befb4f79e0d231ce3aeeccac (patch) | |
tree | 89fddede0584ca8ce6db1ec9af3891ef7bba764e | |
parent | f7c3875137600cd474feadd1c3a7b58dde1eace5 (diff) |
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 <surenb@google.com>
Change-Id: I865469c1eacd8d037eaaa85eca65e54f717e8706
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-rw-r--r-- | drivers/staging/android/ashmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index ce1e2abcbd97..91b83e87aa0f 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; |