The patch titled Subject: mm/mmap.c: optimization of do_mmap_pgoff function has been removed from the -mm tree. Its filename was mm-mmapc-optimization-of-do_mmap_pgoff-function.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Piotr Kwapulinski <kwapulinski.piotr@xxxxxxxxx> Subject: mm/mmap.c: optimization of do_mmap_pgoff function The simple check for zero length memory mapping may be performed earlier. So that in case of zero length memory mapping some unnecessary code is not executed at all. It does not make the code less readable and saves some CPU cycles. Signed-off-by: Piotr Kwapulinski <kwapulinski.piotr@xxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxx> Acked-by: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -puN mm/mmap.c~mm-mmapc-optimization-of-do_mmap_pgoff-function mm/mmap.c --- a/mm/mmap.c~mm-mmapc-optimization-of-do_mmap_pgoff-function +++ a/mm/mmap.c @@ -1258,6 +1258,9 @@ unsigned long do_mmap_pgoff(struct file *populate = 0; + if (!len) + return -EINVAL; + /* * Does the application expect PROT_READ to imply PROT_EXEC? * @@ -1268,9 +1271,6 @@ unsigned long do_mmap_pgoff(struct file if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC))) prot |= PROT_EXEC; - if (!len) - return -EINVAL; - if (!(flags & MAP_FIXED)) addr = round_hint_to_min(addr); _ Patches currently in -mm which might be from kwapulinski.piotr@xxxxxxxxx are origin.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html