Commit a6f563db09c54c80d80e9013182dc512a5e53d0f
Committed by
Linus Torvalds
1 parent
fb8d14e172
Exists in
master
and in
20 other branches
[PATCH] remove VM_DONTCOPY bogosities
Now that it's madvisable, remove two pieces of VM_DONTCOPY bogosity: 1. There was and is no logical reason why VM_DONTCOPY should be in the list of flags which forbid vma merging (and those drivers which set it are also setting VM_IO, which itself forbids the merge). 2. It's hard to understand the purpose of the VM_HUGETLB, VM_DONTCOPY block in vm_stat_account: but never mind, it's under CONFIG_HUGETLB, which (unlike CONFIG_HUGETLB_PAGE or CONFIG_HUGETLBFS) has never been defined. Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 1 additions and 9 deletions Side-by-side Diff
mm/mmap.c
... | ... | @@ -612,7 +612,7 @@ |
612 | 612 | * If the vma has a ->close operation then the driver probably needs to release |
613 | 613 | * per-vma resources, so we don't attempt to merge those. |
614 | 614 | */ |
615 | -#define VM_SPECIAL (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP) | |
615 | +#define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP) | |
616 | 616 | |
617 | 617 | static inline int is_mergeable_vma(struct vm_area_struct *vma, |
618 | 618 | struct file *file, unsigned long vm_flags) |
... | ... | @@ -844,14 +844,6 @@ |
844 | 844 | { |
845 | 845 | const unsigned long stack_flags |
846 | 846 | = VM_STACK_FLAGS & (VM_GROWSUP|VM_GROWSDOWN); |
847 | - | |
848 | -#ifdef CONFIG_HUGETLB | |
849 | - if (flags & VM_HUGETLB) { | |
850 | - if (!(flags & VM_DONTCOPY)) | |
851 | - mm->shared_vm += pages; | |
852 | - return; | |
853 | - } | |
854 | -#endif /* CONFIG_HUGETLB */ | |
855 | 847 | |
856 | 848 | if (file) { |
857 | 849 | mm->shared_vm += pages; |