mount2: invalidate fuse cache for replaced inode

This commit is contained in:
chrislu committed 2022-02-27 00:00:23 -08:00
1 parent 4ddcbaab57
commit 9ef5bb20f6
3 files changed
+14 -2

No files matched your search

+2 -1
View File
@@ -138,7 +138,7 @@ func (i *InodeToPath) RemovePath(path util.FullPath) {
}
}
func (i *InodeToPath) MovePath(sourcePath, targetPath util.FullPath) {
func (i *InodeToPath) MovePath(sourcePath, targetPath util.FullPath) (replacedInode uint64) {
i.Lock()
defer i.Unlock()
sourceInode, sourceFound := i.path2inode[sourcePath]
@@ -157,6 +157,7 @@ func (i *InodeToPath) MovePath(sourcePath, targetPath util.FullPath) {
} else {
i.inode2path[sourceInode].nlookup++
}
return targetInode
}
func (i *InodeToPath) Forget(inode, nlookup uint64, onForgetDir func(dir util.FullPath)) {