mm: memory: remove ->vm_file check on shared writable vmas
authorJohannes Weiner <hannes@cmpxchg.org>
Tue, 10 Feb 2015 22:11:28 +0000 (14:11 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Feb 2015 22:30:33 +0000 (14:30 -0800)
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>
mm/memory.c

index 9aa0921..0e9b326 100644 (file)
@@ -2127,9 +2127,7 @@ reuse:
                                balance_dirty_pages_ratelimited(mapping);
                        }
 
-                       /* file_update_time outside page_lock */
-                       if (vma->vm_file)
-                               file_update_time(vma->vm_file);
+                       file_update_time(vma->vm_file);
                }
                put_page(dirty_page);
                if (page_mkwrite) {
@@ -2971,8 +2969,7 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
                balance_dirty_pages_ratelimited(mapping);
        }
 
-       /* file_update_time outside page_lock */
-       if (vma->vm_file && !vma->vm_ops->page_mkwrite)
+       if (!vma->vm_ops->page_mkwrite)
                file_update_time(vma->vm_file);
 
        return ret;