OSDN Git Service

mm/msync: exit early when the flags is an MS_ASYNC and start < vm_start
authorNikita Ermakov <sh1r4s3@mail.si-head.nl>
Fri, 30 Apr 2021 05:55:41 +0000 (22:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Apr 2021 18:20:37 +0000 (11:20 -0700)
commitf6899bc03cbadc6e308d98252c4a832b5fd45b87
tree047f88de9d3090eda8dd6ef962c4c8cf95c09aae
parent4b17f030fdc821ca58218489e3b7fd8381707849
mm/msync: exit early when the flags is an MS_ASYNC and start < vm_start

If an unmapped region was found and the flag is MS_ASYNC (without
MS_INVALIDATE) there is nothing to do and the result would be always
-ENOMEM, so return immediately.

Link: https://lkml.kernel.org/r/20201025092901.56399-1-sh1r4s3@mail.si-head.nl
Signed-off-by: Nikita Ermakov <sh1r4s3@mail.si-head.nl>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/msync.c