]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/msync: exit early when the flags is an MS_ASYNC and start < vm_start
authorNikita Ermakov <sh1r4s3@mail.si-head.nl>
Thu, 31 Dec 2020 22:03:58 +0000 (22:03 +0000)
committerJohannes Weiner <hannes@cmpxchg.org>
Thu, 31 Dec 2020 22:03:58 +0000 (22:03 +0000)
commite153d678cedc5c4cfed0d2960a3999bcaa68b00d
tree839c3abc09f68fbd40c24d24bc168210780c27f9
parente60085ee2dddf3aac262d036bdcdacc373d8188f
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>
mm/msync.c