]> git.karo-electronics.de Git - karo-tx-linux.git/commit
shmem: let shared anonymous be nonlinear again
authorHugh Dickins <hughd@google.com>
Tue, 22 Mar 2011 23:33:43 +0000 (16:33 -0700)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 14 Mar 2012 14:56:48 +0000 (10:56 -0400)
commit9195c4ca3ee1ae26d23b4a61b789ef95c563c1de
treebfed8a858349690576c17cec24a748c7d2bc4d07
parent43f46a13a554fe6e8f55069b8c992a65f0897ba2
shmem: let shared anonymous be nonlinear again

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 <theonetruekenny@yahoo.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
mm/shmem.c