add back handles lock

This commit is contained in:
Chris Lu 2020-08-12 23:52:13 -07:00
parent f735d579d3
commit d43129d27f

View file

@ -63,6 +63,9 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector
// fmt.Printf("rename path: %v => %v\n", oldPath, newPath)
dir.wfs.fsNodeCache.Move(oldPath, newPath)
wfs.handlesLock.Lock()
defer wfs.handlesLock.Unlock()
delete(dir.wfs.handles, oldPath.AsInode())
return err