Skip to content

Commit bb41348

Browse files
committed
afs: Fix non-setting of mtime when writing into mmap
The mtime on an inode needs to be updated when a write is made into an mmap'ed section. There are three ways in which this could be done: update it when page_mkwrite is called, update it when a page is changed from dirty to writeback or leave it to the server and fix the mtime up from the reply to the StoreData RPC. Found with the generic/215 xfstest. Fixes: 1cf7a15 ("afs: Implement shared-writeable mmap") Signed-off-by: David Howells <dhowells@redhat.com>
1 parent b3a9e3b commit bb41348

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎fs/afs/write.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,7 @@ vm_fault_t afs_page_mkwrite(struct vm_fault *vmf)
844844
vmf->page->index, priv);
845845
SetPagePrivate(vmf->page);
846846
set_page_private(vmf->page, priv);
847+
file_update_time(file);
847848

848849
sb_end_pagefault(inode->i_sb);
849850
return VM_FAULT_LOCKED;

0 commit comments

Comments
 (0)