]> 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>
Thu, 7 Feb 2013 01:26:20 +0000 (12:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:22 +0000 (16:46 +1100)
commit106e9baaa64ff2fcf7901ba5b3fb1e0c71183202
tree5a1d78e23bf681edbeb596a6259708f0f1bc0c29
parent94e71f6d4d370fa46d9f2186e209023b89d2dbe8
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