diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-21 01:20:01 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-21 02:29:13 +0200 |
commit | a46ef99d80817a167477ed1c8b4d90ee0c2e726f (patch) | |
tree | 3d8c980c627e8b9c009dbf63628a9be8b8d1069f /fs/aio.c | |
parent | VM: add "vm_brk()" helper function (diff) | |
download | linux-a46ef99d80817a167477ed1c8b4d90ee0c2e726f.tar.xz linux-a46ef99d80817a167477ed1c8b4d90ee0c2e726f.zip |
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 <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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); |