diff options
Diffstat (limited to 'weed/mount/inode_to_path.go')
| -rw-r--r-- | weed/mount/inode_to_path.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go index 21e6c867c..6650f2380 100644 --- a/weed/mount/inode_to_path.go +++ b/weed/mount/inode_to_path.go @@ -82,3 +82,15 @@ func (i *InodeToPath) RemovePath(path util.FullPath) { delete(i.inode2path, inode) } } +func (i *InodeToPath) RemoveInode(inode uint64) { + if inode == 1 { + return + } + i.RLock() + defer i.RUnlock() + path, found := i.inode2path[inode] + if found { + delete(i.path2inode, path) + delete(i.inode2path, inode) + } +} |
