Skip to content

Commit

Permalink
fs: Push file_update_time() into __block_page_mkwrite()
Browse files Browse the repository at this point in the history
Tested-by: Kamal Mostafa <[email protected]>
Tested-by: Peter M. Petrakis <[email protected]>
Tested-by: Dann Frazier <[email protected]>
Tested-by: Massimo Morana <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
jankara authored and Al Viro committed Jul 30, 2012
1 parent 183fef9 commit 5e8830d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2318,6 +2318,12 @@ int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
loff_t size;
int ret;

/*
* Update file times before taking page lock. We may end up failing the
* fault so this update may be superfluous but who really cares...
*/
file_update_time(vma->vm_file);

lock_page(page);
size = i_size_read(inode);
if ((page->mapping != inode->i_mapping) ||
Expand Down

0 comments on commit 5e8830d

Please sign in to comment.