Skip to content
Commit e37609bb authored by Piotr Kwapulinski's avatar Piotr Kwapulinski Committed by Linus Torvalds
Browse files

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: default avatarPiotr Kwapulinski <kwapulinski.piotr@gmail.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.cz>
Acked-by: default avatarRik van Riel <riel@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 93ada579
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment