Browse Source

mount: clear possible leftover entry data in memory

pull/1596/head
Chris Lu 4 years ago
parent
commit
e1423a83dd
  1. 8
      weed/filesys/dir.go

8
weed/filesys/dir.go

@ -362,6 +362,14 @@ func (dir *Dir) removeOneFile(req *fuse.RemoveRequest) error {
// then, delete meta cache and fsNode cache // then, delete meta cache and fsNode cache
dir.wfs.metaCache.DeleteEntry(context.Background(), filePath) dir.wfs.metaCache.DeleteEntry(context.Background(), filePath)
// clear entry inside the file
fsNode := dir.wfs.fsNodeCache.GetFsNode(filePath)
if fsNode != nil {
if file, ok := fsNode.(*File); ok {
file.clearEntry()
}
}
dir.wfs.fsNodeCache.DeleteFsNode(filePath) dir.wfs.fsNodeCache.DeleteFsNode(filePath)
// remove current file handle if any // remove current file handle if any

Loading…
Cancel
Save