ANDROID: fix up direct access to mmap_sem

It's now being abstracted away, so fix up the ANDROID specific code that
touches the lock to use the correct functions instead.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9cedb62118cd1bba7af27deb11499d312d24d7fc
This commit is contained in:
Greg Kroah-Hartman
2020-06-24 18:17:12 +02:00
parent 3203312829
commit 1da58ab555
2 changed files with 5 additions and 5 deletions

View File

@@ -2361,7 +2361,7 @@ static int prctl_set_vma_anon_name(unsigned long start, unsigned long end,
return error;
if (prev)
vma = prev->vm_next;
else /* madvise_remove dropped mmap_sem */
else /* madvise_remove dropped mmap_lock */
vma = find_vma(current->mm, start);
}
}
@@ -2389,7 +2389,7 @@ static int prctl_set_vma(unsigned long opt, unsigned long start,
if (end == start)
return 0;
down_write(&mm->mmap_sem);
mmap_write_lock(mm);
switch (opt) {
case PR_SET_VMA_ANON_NAME:
@@ -2399,7 +2399,7 @@ static int prctl_set_vma(unsigned long opt, unsigned long start,
error = -EINVAL;
}
up_write(&mm->mmap_sem);
mmap_write_unlock(mm);
return error;
}