diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-06-28 13:41:00 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-06-28 13:41:00 -0700 |
| commit | 42a338d7b0cba93b0feadd0cb826e301876b109d (patch) | |
| tree | 21dbaf05ca8847de72c34ecc70df0f1041d17cb0 /weed | |
| parent | 95a1860d653ad886d4f70d031f8af0c5bf5351d4 (diff) | |
| download | seaweedfs-42a338d7b0cba93b0feadd0cb826e301876b109d.tar.xz seaweedfs-42a338d7b0cba93b0feadd0cb826e301876b109d.zip | |
FUSE mount: clean up file handles during renaming
resolve dir rename when file is still open. Need to clean the file handles as soon as possible.
These can happen out of order:
file rename, then file release
file release, then file rename
Diffstat (limited to 'weed')
| -rw-r--r-- | weed/filesys/dir_rename.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/weed/filesys/dir_rename.go b/weed/filesys/dir_rename.go index d618c28ea..0f7f131b1 100644 --- a/weed/filesys/dir_rename.go +++ b/weed/filesys/dir_rename.go @@ -42,6 +42,7 @@ 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) + delete(dir.wfs.handles, oldPath.AsInode()) } |
