Commit df38958b authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

nodefs: setEntryOutTimeout()

parent f93557e8
...@@ -100,14 +100,17 @@ func (b *rawBridge) Lookup(header *fuse.InHeader, name string, out *fuse.EntryOu ...@@ -100,14 +100,17 @@ func (b *rawBridge) Lookup(header *fuse.InHeader, name string, out *fuse.EntryOu
b.mu.Unlock() b.mu.Unlock()
unlockNodes(parent, child) unlockNodes(parent, child)
b.setEntryOutTimeout(out)
return fuse.OK
}
func (b *rawBridge) setEntryOutTimeout(out *fuse.EntryOut) {
if b.options.AttrTimeout != nil { if b.options.AttrTimeout != nil {
out.SetAttrTimeout(*b.options.AttrTimeout) out.SetAttrTimeout(*b.options.AttrTimeout)
} }
if b.options.EntryTimeout != nil { if b.options.EntryTimeout != nil {
out.SetEntryTimeout(*b.options.EntryTimeout) out.SetEntryTimeout(*b.options.EntryTimeout)
} }
return fuse.OK
} }
// registerInode sets an nodeID in the child. Must have bridge.mu and // registerInode sets an nodeID in the child. Must have bridge.mu and
...@@ -152,12 +155,7 @@ func (b *rawBridge) Create(input *fuse.CreateIn, name string, out *fuse.CreateOu ...@@ -152,12 +155,7 @@ func (b *rawBridge) Create(input *fuse.CreateIn, name string, out *fuse.CreateOu
b.mu.Unlock() b.mu.Unlock()
unlockNode2(parent, child) unlockNode2(parent, child)
if b.options.AttrTimeout != nil { b.setEntryOutTimeout(out)
out.SetAttrTimeout(*b.options.AttrTimeout)
}
if b.options.EntryTimeout != nil {
out.SetEntryTimeout(*b.options.EntryTimeout)
}
out.OpenFlags = flags out.OpenFlags = flags
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment