From d43129d27fec49244689b37e511937d037cf89be Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 12 Aug 2020 23:52:13 -0700 Subject: [PATCH] add back handles lock --- weed/filesys/dir_rename.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index da4f1b232..573706b21 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -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