Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933674Ab1C3VWo (ORCPT ); Wed, 30 Mar 2011 17:22:44 -0400 Received: from mga09.intel.com ([134.134.136.24]:9067 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965093Ab1C3VJ3 (ORCPT ); Wed, 30 Mar 2011 17:09:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.63,270,1299484800"; d="scan'208";a="621238694" From: Andi Kleen References: <20110330203.501921634@firstfloor.org> In-Reply-To: <20110330203.501921634@firstfloor.org> To: hughd@google.com, akpm@linux-foundation.org, torvalds@linux-foundation.org, gregkh@suse.de, ak@linux.intel.com, linux-kernel@vger.kernel.org, stable@kernel.org, tim.bird@am.sony.com Subject: [PATCH] [222/275] shmem: let shared anonymous be nonlinear again Message-Id: <20110330210747.6F2C23E1A05@tassilo.jf.intel.com> Date: Wed, 30 Mar 2011 14:07:47 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1562 Lines: 40 2.6.35-longterm review patch. If anyone has any objections, please let me know. ------------------ From: Hugh Dickins 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 Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andi Kleen --- 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; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/