* [PATCH] shmem: let shared anonymous be nonlinear again
@ 2011-03-20 5:30 Hugh Dickins
0 siblings, 0 replies; only message in thread
From: Hugh Dickins @ 2011-03-20 5:30 UTC (permalink / raw)
To: Andrew Morton; +Cc: Kenny Simpson, linux-kernel, linux-mm
Up to 2.6.22, you could use remap_file_pages(2) on a tmpfs file or a
shared mapping of /dev/zero or a shared anonymous mapping. In 2.6.23
we disabled it by default, but set VM_CAN_NONLINEAR to enable it on
safe mappings. We made sure to set it in shmem_mmap() for tmpfs files,
but missed it in shmem_zero_setup() for the others. Fix that at last.
Reported-by: Kenny Simpson <theonetruekenny@yahoo.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
---
mm/shmem.c | 1 +
1 file changed, 1 insertion(+)
--- 2.6.38/mm/shmem.c 2011-03-14 18:20:32.000000000 -0700
+++ linux/mm/shmem.c 2011-03-19 15:09:26.000000000 -0700
@@ -2791,5 +2791,6 @@ int shmem_zero_setup(struct vm_area_stru
fput(vma->vm_file);
vma->vm_file = file;
vma->vm_ops = &shmem_vm_ops;
+ vma->vm_flags |= VM_CAN_NONLINEAR;
return 0;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-20 5:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-20 5:30 [PATCH] shmem: let shared anonymous be nonlinear again Hugh Dickins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox