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

Commit c1515999 authored by David Howells's avatar David Howells
Browse files

afs: Invalidate cache on server data change



Invalidate any data stored in fscache for a vnode that changes on the
server so that we don't end up with the cache in a bad state locally.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 17dec0a9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -343,6 +343,10 @@ void afs_zap_data(struct afs_vnode *vnode)
{
	_enter("{%x:%u}", vnode->fid.vid, vnode->fid.vnode);

#ifdef CONFIG_AFS_FSCACHE
	fscache_invalidate(vnode->cache);
#endif

	/* nuke all the non-dirty pages that aren't locked, mapped or being
	 * written back in a regular file and completely discard the pages in a
	 * directory or symlink */