switch aio and shm to do_mmap_pgoff(), make do_mmap() static
after all, 0 bytes and 0 pages is the same thing... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
6
fs/aio.c
6
fs/aio.c
@@ -134,9 +134,9 @@ static int aio_setup_ring(struct kioctx *ctx)
|
||||
info->mmap_size = nr_pages * PAGE_SIZE;
|
||||
dprintk("attempting mmap of %lu bytes\n", info->mmap_size);
|
||||
down_write(&ctx->mm->mmap_sem);
|
||||
info->mmap_base = do_mmap(NULL, 0, info->mmap_size,
|
||||
PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE,
|
||||
0);
|
||||
info->mmap_base = do_mmap_pgoff(NULL, 0, info->mmap_size,
|
||||
PROT_READ|PROT_WRITE,
|
||||
MAP_ANONYMOUS|MAP_PRIVATE, 0);
|
||||
if (IS_ERR((void *)info->mmap_base)) {
|
||||
up_write(&ctx->mm->mmap_sem);
|
||||
info->mmap_size = 0;
|
||||
|
Verwijs in nieuw issue
Block a user