[01/12] afs: Invalidate cache on server data change
diff mbox

Message ID 152287960744.14760.15224735251275266488.stgit@warthog.procyon.org.uk
State New
Headers show

Commit Message

David Howells April 4, 2018, 10:06 p.m. UTC
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: David Howells <dhowells@redhat.com>

 fs/afs/inode.c |    4 ++++
 1 file changed, 4 insertions(+)

To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

diff mbox

diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index 6b39d0255b72..42f83fd5a896 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -343,6 +343,10 @@  void afs_zap_data(struct afs_vnode *vnode)
 	_enter("{%x:%u}", vnode->fid.vid, vnode->fid.vnode);
+	fscache_invalidate(vnode->cache);
 	/* 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 */