]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: make do_mmap_pgoff return populate as a size in bytes, not as a bool
authorMichel Lespinasse <walken@google.com>
Wed, 20 Feb 2013 02:14:09 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:26 +0000 (16:52 +1100)
commitba75215515ce15ea418f5eb165254cc36c7a847f
tree4e598002774c3e4b2d5c73a6e3cbbd8589602ff5
parentaeb01c910da87702d299fa291254534b2a00c1c2
mm: make do_mmap_pgoff return populate as a size in bytes, not as a bool

do_mmap_pgoff() rounds up the desired size to the next PAGE_SIZE multiple,
however there was no equivalent code in mm_populate(), which caused issues.

This could be fixed by introduced the same rounding in mm_populate(),
however I think it's preferable to make do_mmap_pgoff() return populate
as a size rather than as a boolean, so we don't have to duplicate the
size rounding logic in mm_populate().

Signed-off-by: Michel Lespinasse <walken@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Tested-by: Andy Lutomirski <luto@amacapital.net>
Cc: Greg Ungerer <gregungerer@westnet.com.au>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/aio.c
include/linux/mm.h
ipc/shm.c
mm/mmap.c
mm/nommu.c
mm/util.c