2.6.35-longterm review patch. If anyone has any objections, please let me know.
------------------ From: Hugh Dickins <[email protected]> commit bee4c36a5cf5c9f63ce1d7372aa62045fbd16d47 upstream. 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 <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andi Kleen <[email protected]> --- mm/shmem.c | 1 + 1 file changed, 1 insertion(+) Index: linux-2.6.35.y/mm/shmem.c =================================================================== --- linux-2.6.35.y.orig/mm/shmem.c 2011-03-29 22:50:27.900544514 -0700 +++ linux-2.6.35.y/mm/shmem.c 2011-03-29 23:03:02.862226932 -0700 @@ -2756,5 +2756,6 @@ fput(vma->vm_file); vma->vm_file = file; vma->vm_ops = &shmem_vm_ops; + vma->vm_flags |= VM_CAN_NONLINEAR; return 0; } _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
