aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-20 19:20:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-20 20:29:13 -0400
commita46ef99d80817a167477ed1c8b4d90ee0c2e726f (patch)
tree3d8c980c627e8b9c009dbf63628a9be8b8d1069f /fs/aio.c
parente4eb1ff61b323d6141614e5458a1f53c7046ff8e (diff)
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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/aio.c b/fs/aio.c
index da887604dfc5..99bd790e8cd2 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -92,11 +92,8 @@ static void aio_free_ring(struct kioctx *ctx)
92 for (i=0; i<info->nr_pages; i++) 92 for (i=0; i<info->nr_pages; i++)
93 put_page(info->ring_pages[i]); 93 put_page(info->ring_pages[i]);
94 94
95 if (info->mmap_size) { 95 if (info->mmap_size)
96 down_write(&ctx->mm->mmap_sem); 96 vm_munmap(ctx->mm, info->mmap_base, info->mmap_size);
97 do_munmap(ctx->mm, info->mmap_base, info->mmap_size);
98 up_write(&ctx->mm->mmap_sem);
99 }
100 97
101 if (info->ring_pages && info->ring_pages != info->internal_pages) 98 if (info->ring_pages && info->ring_pages != info->internal_pages)
102 kfree(info->ring_pages); 99 kfree(info->ring_pages);