Skip to content

Commit c151599

Browse files
committed
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: David Howells <[email protected]>
1 parent 17dec0a commit c151599

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/afs/inode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ void afs_zap_data(struct afs_vnode *vnode)
343343
{
344344
_enter("{%x:%u}", vnode->fid.vid, vnode->fid.vnode);
345345

346+
#ifdef CONFIG_AFS_FSCACHE
347+
fscache_invalidate(vnode->cache);
348+
#endif
349+
346350
/* nuke all the non-dirty pages that aren't locked, mapped or being
347351
* written back in a regular file and completely discard the pages in a
348352
* directory or symlink */

0 commit comments

Comments
 (0)