]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit82196fff9e4885bb528f7277385f0c0a44da8d60
tree047f88de9d3090eda8dd6ef962c4c8cf95c09aae
parent3cd5cc276d790931c92d5bafbc43b0621b2f8bd5
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