diff options
author | David Howells <dhowells@redhat.com> | 2020-06-12 00:15:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-25 15:33:06 +0200 |
commit | 08de5907c06ed7397930781244e066364708658d (patch) | |
tree | 60785f9f1e3e1b509b8b1070dc5c0bb0b78ce7ba | |
parent | 2ee8f6e72269eb06649ebab3da6bbf59aed3eabe (diff) | |
download | linux-stable-08de5907c06ed7397930781244e066364708658d.tar.gz linux-stable-08de5907c06ed7397930781244e066364708658d.tar.bz2 linux-stable-08de5907c06ed7397930781244e066364708658d.zip |
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>
-rw-r--r-- | fs/afs/write.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c index e00461a6de9a..53f329f61cc3 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -792,6 +792,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; |