diff --git a/[refs] b/[refs] index fbdd5b0797bc..f0e3aa6adba3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7701c9c0f54feb682d0cefa2ae1f4a1e00e0ba09 +refs/heads/master: 8314c4f24a0a5c9b1f7544e9fa83a1d5367ddaa7 diff --git a/trunk/mm/mmap.c b/trunk/mm/mmap.c index ffd6c6c9bcf4..22dff49d579e 100644 --- a/trunk/mm/mmap.c +++ b/trunk/mm/mmap.c @@ -657,9 +657,6 @@ again: remove_next = 1 + (end > next->vm_end); validate_mm(mm); } -/* Flags that can be inherited from an existing mapping when merging */ -#define VM_MERGEABLE_FLAGS (VM_CAN_NONLINEAR) - /* * If the vma has a ->close operation then the driver probably needs to release * per-vma resources, so we don't attempt to merge those. @@ -667,7 +664,8 @@ again: remove_next = 1 + (end > next->vm_end); static inline int is_mergeable_vma(struct vm_area_struct *vma, struct file *file, unsigned long vm_flags) { - if ((vma->vm_flags ^ vm_flags) & ~VM_MERGEABLE_FLAGS) + /* VM_CAN_NONLINEAR may get set later by f_op->mmap() */ + if ((vma->vm_flags ^ vm_flags) & ~VM_CAN_NONLINEAR) return 0; if (vma->vm_file != file) return 0;