mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
fs: Push file_update_time() into __block_page_mkwrite()
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]>
This commit is contained in:
1 parent
183fef91cd
commit
5e8830dc85
1 file changed
+6
@@ -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) ||
|
||||
|
||||
Reference in new issue
Block a user