[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.00.1103192227570.1659@sister.anvils>
Date: Sat, 19 Mar 2011 22:30:28 -0700 (PDT)
From: Hugh Dickins <hughd@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Kenny Simpson <theonetruekenny@...oo.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH] shmem: let shared anonymous be nonlinear again
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@...oo.com>
Signed-off-by: Hugh Dickins <hughd@...gle.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists