mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
VM: add "vm_munmap()" helper function
Like the vm_brk() function, this is the same as "do_munmap()", except it does the VM locking for the caller. Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e4eb1ff61b
commit
a46ef99d80
8 changed files with 25 additions and 33 deletions
7
fs/aio.c
7
fs/aio.c
|
|
@ -92,11 +92,8 @@ static void aio_free_ring(struct kioctx *ctx)
|
|||
for (i=0; i<info->nr_pages; i++)
|
||||
put_page(info->ring_pages[i]);
|
||||
|
||||
if (info->mmap_size) {
|
||||
down_write(&ctx->mm->mmap_sem);
|
||||
do_munmap(ctx->mm, info->mmap_base, info->mmap_size);
|
||||
up_write(&ctx->mm->mmap_sem);
|
||||
}
|
||||
if (info->mmap_size)
|
||||
vm_munmap(ctx->mm, info->mmap_base, info->mmap_size);
|
||||
|
||||
if (info->ring_pages && info->ring_pages != info->internal_pages)
|
||||
kfree(info->ring_pages);
|
||||
|
|
|
|||
Loading…
Reference in a new issue