v2api: Lookup: use newChild() helper
This commit is contained in:
parent
015a884090
commit
49fc3abcb4
@ -69,17 +69,7 @@ func (n *Node) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (ch
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fs.ToErrno(err)
|
return nil, fs.ToErrno(err)
|
||||||
}
|
}
|
||||||
// Get unique inode number
|
ch = n.newChild(ctx, st, out)
|
||||||
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)
|
|
||||||
return ch, 0
|
return ch, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user