summaryrefslogtreecommitdiff
path: root/fs/afs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-06-12 02:15:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-24 18:50:45 +0300
commit6a9fd8046fbd32248b5f18c023c2689834e5ff95 (patch)
tree3028b3d1d35199e7a914efe61097d5f9f60ea31d /fs/afs
parent7b307d292ab26ef6a9b85754a608aa2b5b607318 (diff)
downloadlinux-6a9fd8046fbd32248b5f18c023c2689834e5ff95.tar.xz
afs: Fix non-setting of mtime when writing into mmap
[ Upstream commit bb413489288e4e457353bac513fddb6330d245ca ] 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: 1cf7a1518aef ("afs: Implement shared-writeable mmap") Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/write.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c
index cb76566763db..371db86c6c5e 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -811,6 +811,7 @@ vm_fault_t afs_page_mkwrite(struct vm_fault *vmf)
vmf->page->index, priv);
SetPagePrivate(vmf->page);
set_page_private(vmf->page, priv);
+ file_update_time(file);
sb_end_pagefault(inode->i_sb);
return VM_FAULT_LOCKED;