Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08de5907 authored by David Howells's avatar David Howells Committed by Greg Kroah-Hartman
Browse files

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: 1cf7a151 ("afs: Implement shared-writeable mmap")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2ee8f6e7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;