diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-16 13:21:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-16 13:21:23 -0500 |
commit | 4d7672b46244abffea1953e55688c0ea143dd617 (patch) | |
tree | 9f3bdf438bcb0d5f6e723665ced23308fffb8368 /mm/mremap.c | |
parent | 281ab031a8c9e5b593142eb4ec59a87faae8676a (diff) |
Make sure we copy pages inserted with "vm_insert_page()" on fork
The logic that decides that a fork() might be able to avoid copying a VM
area when it can be re-created by page faults didn't know about the new
vm_insert_page() case.
Also make some things a bit more anal wrt VM_PFNMAP.
Pointed out by Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/mremap.c')
-rw-r--r-- | mm/mremap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mremap.c b/mm/mremap.c index b535438c363c..ddaeee9a0b69 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -323,7 +323,7 @@ unsigned long do_mremap(unsigned long addr, | |||
323 | /* We can't remap across vm area boundaries */ | 323 | /* We can't remap across vm area boundaries */ |
324 | if (old_len > vma->vm_end - addr) | 324 | if (old_len > vma->vm_end - addr) |
325 | goto out; | 325 | goto out; |
326 | if (vma->vm_flags & VM_DONTEXPAND) { | 326 | if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP)) { |
327 | if (new_len > old_len) | 327 | if (new_len > old_len) |
328 | goto out; | 328 | goto out; |
329 | } | 329 | } |