diff options
author | Rik van Riel <riel@redhat.com> | 2010-03-05 16:42:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:26:26 -0500 |
commit | fc148a5f7e0532750c312385c7ee9fa3e9311f34 (patch) | |
tree | dfd132ed225a113f73c61f5e2018e5644bb3f677 /include/linux/mm.h | |
parent | c44b674323f4a2480dbeb65d4b487fa5f06f49e0 (diff) |
mm: remove VM_LOCK_RMAP code
When a VMA is in an inconsistent state during setup or teardown, the worst
that can happen is that the rmap code will not be able to find the page.
The mapping is in the process of being torn down (PTEs just got
invalidated by munmap), or set up (no PTEs have been instantiated yet).
It is also impossible for the rmap code to follow a pointer to an already
freed VMA, because the rmap code holds the anon_vma->lock, which the VMA
teardown code needs to take before the VMA is removed from the anon_vma
chain.
Hence, we should not need the VM_LOCK_RMAP locking at all.
Signed-off-by: Rik van Riel <riel@redhat.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Larry Woodman <lwoodman@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8e2841a2f441..3899395a03de 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -97,11 +97,7 @@ extern unsigned int kobjsize(const void *objp); | |||
97 | #define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */ | 97 | #define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */ |
98 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ | 98 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ |
99 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ | 99 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
100 | #ifdef CONFIG_MMU | ||
101 | #define VM_LOCK_RMAP 0x01000000 /* Do not follow this rmap (mmu mmap) */ | ||
102 | #else | ||
103 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ | 100 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ |
104 | #endif | ||
105 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ | 101 | #define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ |
106 | #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ | 102 | #define VM_ALWAYSDUMP 0x04000000 /* Always include in core dumps */ |
107 | 103 | ||