Browse Source

add back handles lock

random_access_file
Chris Lu 4 years ago
parent
commit
d43129d27f
  1. 3
      weed/filesys/dir_rename.go

3
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) // fmt.Printf("rename path: %v => %v\n", oldPath, newPath)
dir.wfs.fsNodeCache.Move(oldPath, newPath) dir.wfs.fsNodeCache.Move(oldPath, newPath)
wfs.handlesLock.Lock()
defer wfs.handlesLock.Unlock()
delete(dir.wfs.handles, oldPath.AsInode()) delete(dir.wfs.handles, oldPath.AsInode())
return err return err

Loading…
Cancel
Save