diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index 6dd1cd88bfb6..4b0144b24c12 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -1670,6 +1670,9 @@ gotten: | |||
1670 | unlock: | 1670 | unlock: |
1671 | pte_unmap_unlock(page_table, ptl); | 1671 | pte_unmap_unlock(page_table, ptl); |
1672 | if (dirty_page) { | 1672 | if (dirty_page) { |
1673 | if (vma->vm_file) | ||
1674 | file_update_time(vma->vm_file); | ||
1675 | |||
1673 | /* | 1676 | /* |
1674 | * Yes, Virginia, this is actually required to prevent a race | 1677 | * Yes, Virginia, this is actually required to prevent a race |
1675 | * with clear_page_dirty_for_io() from clearing the page dirty | 1678 | * with clear_page_dirty_for_io() from clearing the page dirty |
@@ -2343,6 +2346,9 @@ out_unlocked: | |||
2343 | if (anon) | 2346 | if (anon) |
2344 | page_cache_release(vmf.page); | 2347 | page_cache_release(vmf.page); |
2345 | else if (dirty_page) { | 2348 | else if (dirty_page) { |
2349 | if (vma->vm_file) | ||
2350 | file_update_time(vma->vm_file); | ||
2351 | |||
2346 | set_page_dirty_balance(dirty_page, page_mkwrite); | 2352 | set_page_dirty_balance(dirty_page, page_mkwrite); |
2347 | put_page(dirty_page); | 2353 | put_page(dirty_page); |
2348 | } | 2354 | } |