Commit 3fa30460 authored by David Howells's avatar David Howells Committed by Linus Torvalds

nommu: fix an incorrect comment in the do_mmap_shared_file()

Fix an incorrect comment in the do_mmap_shared_file().  If a mapping is
requested MAP_SHARED, then a private copy cannot be made and still provide
correct semantics.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Reported-by: default avatarDave Hudson <uclinux@blueteddy.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 28b8e8d4
...@@ -1040,10 +1040,9 @@ static int do_mmap_shared_file(struct vm_area_struct *vma) ...@@ -1040,10 +1040,9 @@ static int do_mmap_shared_file(struct vm_area_struct *vma)
if (ret != -ENOSYS) if (ret != -ENOSYS)
return ret; return ret;
/* getting an ENOSYS error indicates that direct mmap isn't /* getting -ENOSYS indicates that direct mmap isn't possible (as
* possible (as opposed to tried but failed) so we'll fall * opposed to tried but failed) so we can only give a suitable error as
* through to making a private copy of the data and mapping * it's not possible to make a private copy if MAP_SHARED was given */
* that if we can */
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
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