summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-06-12 16:20:23 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-30 23:02:44 +0200
commit5e8830dc85d0a6258132977381430b327cf553f2 (patch)
tree8364f55936cd0903947974e7ce2954bc68d244df
parentfb_defio: Push file_update_time() into fb_deferred_io_mkwrite() (diff)
downloadlinux-5e8830dc85d0a6258132977381430b327cf553f2.tar.xz
linux-5e8830dc85d0a6258132977381430b327cf553f2.zip
fs: Push file_update_time() into __block_page_mkwrite()
Tested-by: Kamal Mostafa <kamal@canonical.com> Tested-by: Peter M. Petrakis <peter.petrakis@canonical.com> Tested-by: Dann Frazier <dann.frazier@canonical.com> Tested-by: Massimo Morana <massimo.morana@canonical.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/buffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index c7062c896d7c..d5ec360e332d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -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) ||