diff options
| author | chrislu <chris.lu@gmail.com> | 2022-02-28 02:08:24 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-02-28 02:08:24 -0800 |
| commit | aad62ee148979d83616c41f28fd81695e53abd33 (patch) | |
| tree | 941af5535c59cf981239dcb28aef36ebf714212d | |
| parent | 554e23909764ffbc2f25c11108870be445548f9c (diff) | |
| download | seaweedfs-aad62ee148979d83616c41f28fd81695e53abd33.tar.xz seaweedfs-aad62ee148979d83616c41f28fd81695e53abd33.zip | |
mount: mark directory uncached if forgotten
| -rw-r--r-- | weed/mount/inode_to_path.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go index 91934a4a8..1e2126b74 100644 --- a/weed/mount/inode_to_path.go +++ b/weed/mount/inode_to_path.go @@ -187,7 +187,8 @@ func (i *InodeToPath) Forget(inode, nlookup uint64, onForgetDir func(dir util.Fu } i.Unlock() if found { - if path.isDirectory && onForgetDir != nil { + if path.isDirectory && path.nlookup <= 0 && onForgetDir != nil { + path.isChildrenCached = false onForgetDir(path.FullPath) } } |
