summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-07-19 13:15:18 +0200
committerJakob Unterwurzacher2020-07-19 13:15:18 +0200
commit49fc3abcb4867ea4ce2426340dbe583ef6de055a (patch)
treed2f0dc95865cc4586c5a3fd30e0c63e425f273e7
parent015a88409086e4a1af60ab85c5b129f909db3e45 (diff)
v2api: Lookup: use newChild() helper
-rw-r--r--internal/fusefrontend/node.go12
1 files changed, 1 insertions, 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
}