Skip to content

Commit

Permalink
mm: memory: remove ->vm_file check on shared writable vmas
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
hnaz authored and torvalds committed Feb 10, 2015
1 parent d9ecee2 commit 74ec675
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2127,9 +2127,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 74ec675

Please sign in to comment.