aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2015-02-10 17:11:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 17:30:33 -0500
commit74ec67511d36f9c731065b1dae7d9638a3b639d3 (patch)
tree97d5265cbe2418404ded25100c2e94ac462ec29d /mm
parentd9ecee281b8f89da6d3203be62802eda991e37cc (diff)
mm: memory: remove ->vm_file check on shared writable vmas
Shared anonymous mmaps are implemented with shmem files, so all VMAs with shared writable semantics also have an underlying backing file. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 9aa09217fe20..0e9b32610655 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2127,9 +2127,7 @@ reuse:
2127 balance_dirty_pages_ratelimited(mapping); 2127 balance_dirty_pages_ratelimited(mapping);
2128 } 2128 }
2129 2129
2130 /* file_update_time outside page_lock */ 2130 file_update_time(vma->vm_file);
2131 if (vma->vm_file)
2132 file_update_time(vma->vm_file);
2133 } 2131 }
2134 put_page(dirty_page); 2132 put_page(dirty_page);
2135 if (page_mkwrite) { 2133 if (page_mkwrite) {
@@ -2971,8 +2969,7 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2971 balance_dirty_pages_ratelimited(mapping); 2969 balance_dirty_pages_ratelimited(mapping);
2972 } 2970 }
2973 2971
2974 /* file_update_time outside page_lock */ 2972 if (!vma->vm_ops->page_mkwrite)
2975 if (vma->vm_file && !vma->vm_ops->page_mkwrite)
2976 file_update_time(vma->vm_file); 2973 file_update_time(vma->vm_file);
2977 2974
2978 return ret; 2975 return ret;