Commit 74ec6751 authored by Johannes Weiner's avatar Johannes Weiner Committed by Linus Torvalds

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: default avatarJohannes Weiner <hannes@cmpxchg.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d9ecee28
...@@ -2127,8 +2127,6 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, ...@@ -2127,8 +2127,6 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
balance_dirty_pages_ratelimited(mapping); 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); put_page(dirty_page);
...@@ -2971,8 +2969,7 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma, ...@@ -2971,8 +2969,7 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
balance_dirty_pages_ratelimited(mapping); balance_dirty_pages_ratelimited(mapping);
} }
/* file_update_time outside page_lock */ if (!vma->vm_ops->page_mkwrite)
if (vma->vm_file && !vma->vm_ops->page_mkwrite)
file_update_time(vma->vm_file); file_update_time(vma->vm_file);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment