aboutsummaryrefslogtreecommitdiffstats
path: root/mm/fremap.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-11-21 21:32:16 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-22 09:13:42 -0800
commit101d2be7646b7dd1c367d50208a59b29fce61398 (patch)
tree5b01c8a93a749cc776744c71c4f79e95ef5d6393 /mm/fremap.c
parent[PATCH] unpaged: VM_UNPAGED (diff)
downloadlinux-dev-101d2be7646b7dd1c367d50208a59b29fce61398.tar.xz
linux-dev-101d2be7646b7dd1c367d50208a59b29fce61398.zip
[PATCH] unpaged: VM_NONLINEAR VM_RESERVED
There's one peculiar use of VM_RESERVED which the previous patch left behind: because VM_NONLINEAR's try_to_unmap_cluster uses vm_private_data as a swapout cursor, but should never meet VM_RESERVED vmas, it was a way of extending VM_NONLINEAR to VM_RESERVED vmas using vm_private_data for some other purpose. But that's an empty set - they don't have the populate function required. So just throw away those VM_RESERVED tests. But one more interesting in rmap.c has to go too: try_to_unmap_one will want to swap out an anonymous page from VM_RESERVED or VM_UNPAGED area. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/fremap.c')
-rw-r--r--mm/fremap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/fremap.c b/mm/fremap.c
index 94254c5d7a18..007cbad9331e 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -204,12 +204,10 @@ asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
* Make sure the vma is shared, that it supports prefaulting,
* and that the remapped range is valid and fully within
* the single existing vma. vm_private_data is used as a
- * swapout cursor in a VM_NONLINEAR vma (unless VM_RESERVED
- * or VM_LOCKED, but VM_LOCKED could be revoked later on).
+ * swapout cursor in a VM_NONLINEAR vma.
*/
if (vma && (vma->vm_flags & VM_SHARED) &&
- (!vma->vm_private_data ||
- (vma->vm_flags & (VM_NONLINEAR|VM_RESERVED))) &&
+ (!vma->vm_private_data || (vma->vm_flags & VM_NONLINEAR)) &&
vma->vm_ops && vma->vm_ops->populate &&
end > start && start >= vma->vm_start &&
end <= vma->vm_end) {