From: Jan Kara Date: Tue, 12 Jun 2012 14:20:23 +0000 (+0200) Subject: fs: Push file_update_time() into __block_page_mkwrite() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5e8830dc85d0a6258132977381430b327cf553f2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git fs: Push file_update_time() into __block_page_mkwrite() Tested-by: Kamal Mostafa Tested-by: Peter M. Petrakis Tested-by: Dann Frazier Tested-by: Massimo Morana Signed-off-by: Jan Kara Signed-off-by: Al Viro --- 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) ||