// forgetNode forgets a formerly active child with basename name. func (f *Folder) forgetNode(node libkbfs.Node) { f.mu.Lock() defer f.mu.Unlock() delete(f.nodes, node.GetID()) if len(f.nodes) == 0 { f.list.forgetFolder(f) } }
// forgetNode forgets a formerly active child with basename name. func (f *Folder) forgetNode(node libkbfs.Node) { f.nodesMu.Lock() defer f.nodesMu.Unlock() delete(f.nodes, node.GetID()) if len(f.nodes) == 0 { ctx := context.Background() f.unsetFolderBranch(ctx) f.list.forgetFolder(string(f.name())) } }
func (f *Folder) localChangeInvalidate(ctx context.Context, node libkbfs.Node, write libkbfs.WriteRange) { f.mu.Lock() n, ok := f.nodes[node.GetID()] f.mu.Unlock() if !ok { return } if err := f.invalidateNodeDataRange(n, write); err != nil && err != fuse.ErrNotCached { // TODO we have no mechanism to do anything about this f.fs.log.CErrorf(ctx, "FUSE invalidate error: %v", err) } }