diff options
| author | Gaspare Iengo <gaspareiengo@gmail.com> | 2024-06-06 19:49:33 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-06 12:49:33 -0700 |
| commit | fce8fc1e16978e398f4d55177328ea50ac8210b9 (patch) | |
| tree | d9c01a7346376363314d0c40e4af5e981550b025 /weed/mount/inode_to_path.go | |
| parent | d8da4bbaa713db935514b74f44b5a498bbe5ad7e (diff) | |
| download | seaweedfs-fce8fc1e16978e398f4d55177328ea50ac8210b9.tar.xz seaweedfs-fce8fc1e16978e398f4d55177328ea50ac8210b9.zip | |
Fix Issue #5649 (#5652)
Diffstat (limited to 'weed/mount/inode_to_path.go')
| -rw-r--r-- | weed/mount/inode_to_path.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go index 2c0b7203e..9992f1c22 100644 --- a/weed/mount/inode_to_path.go +++ b/weed/mount/inode_to_path.go @@ -114,9 +114,9 @@ func (i *InodeToPath) AllocateInode(path util.FullPath, unixTime int64) uint64 { return inode } -func (i *InodeToPath) GetInode(path util.FullPath) uint64 { +func (i *InodeToPath) GetInode(path util.FullPath) (uint64, bool) { if path == "/" { - return 1 + return 1, true } i.Lock() defer i.Unlock() @@ -125,7 +125,7 @@ func (i *InodeToPath) GetInode(path util.FullPath) uint64 { // glog.Fatalf("GetInode unknown inode for %s", path) // this could be the parent for mount point } - return inode + return inode, found } func (i *InodeToPath) GetPath(inode uint64) (util.FullPath, fuse.Status) { |
