aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/inode_to_path.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/inode_to_path.go')
-rw-r--r--weed/mount/inode_to_path.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go
index e3fabb422..21e6c867c 100644
--- a/weed/mount/inode_to_path.go
+++ b/weed/mount/inode_to_path.go
@@ -69,3 +69,16 @@ func (i *InodeToPath) HasInode(inode uint64) bool {
_, found := i.inode2path[inode]
return found
}
+
+func (i *InodeToPath) RemovePath(path util.FullPath) {
+ if path == "/" {
+ return
+ }
+ i.Lock()
+ defer i.Unlock()
+ inode, found := i.path2inode[path]
+ if found {
+ delete(i.path2inode, path)
+ delete(i.inode2path, inode)
+ }
+}