From 49fc3abcb4867ea4ce2426340dbe583ef6de055a Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 19 Jul 2020 13:15:18 +0200 Subject: v2api: Lookup: use newChild() helper --- internal/fusefrontend/node.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/internal/fusefrontend/node.go b/internal/fusefrontend/node.go index 01cc9c3..9d49add 100644 --- a/internal/fusefrontend/node.go +++ b/internal/fusefrontend/node.go @@ -69,17 +69,7 @@ func (n *Node) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (ch if err != nil { return nil, fs.ToErrno(err) } - // Get unique inode number - n.rootNode().inoMap.TranslateStat(st) - out.Attr.FromStat(st) - // Create child node - id := fs.StableAttr{ - Mode: uint32(st.Mode), - Gen: 1, - Ino: st.Ino, - } - node := &Node{} - ch = n.NewInode(ctx, node, id) + ch = n.newChild(ctx, st, out) return ch, 0 } -- cgit v1.2.3