Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331623
b: refs/heads/master
c: 041bbb6
h: refs/heads/master
i:
  331621: 7995a44
  331619: 1aea125
  331615: 96a7865
v: v3
  • Loading branch information
Theodore Ts'o committed Oct 1, 2012
1 parent c8831c1 commit fc94344
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f2080e64487b9963f9c6ff8a252e1abce98f2d4
refs/heads/master: 041bbb6d369811e948ae01f3d00414264076be35
13 changes: 7 additions & 6 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2318,12 +2318,6 @@ 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 Expand Up @@ -2361,6 +2355,13 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
struct super_block *sb = vma->vm_file->f_path.dentry->d_inode->i_sb;

sb_start_pagefault(sb);

/*
* 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);

ret = __block_page_mkwrite(vma, vmf, get_block);
sb_end_pagefault(sb);
return block_page_mkwrite_return(ret);
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4788,6 +4788,7 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
int retries = 0;

sb_start_pagefault(inode->i_sb);
file_update_time(vma->vm_file);
/* Delalloc case is easy... */
if (test_opt(inode->i_sb, DELALLOC) &&
!ext4_should_journal_data(inode) &&
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/nilfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
if (unlikely(ret))
goto out;

file_update_time(vma->vm_file);
ret = __block_page_mkwrite(vma, vmf, nilfs_get_block);
if (ret) {
nilfs_transaction_abort(inode->i_sb);
Expand Down

0 comments on commit fc94344

Please sign in to comment.